﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Data;
using System.Data.SqlClient;

namespace BaoShouTangServer.ApiModels
{
    public class zpurpotail
    {
        public zpurpotail()
        { }
        #region Model
        private int _id;
        private int? _poid;
        private int? _iappids;
        private string _cinvcode;
        private string _cinvname;
        private string _cinvstd;
        private string _cinvaddcode;
        private decimal? _iquotedprice;
        private decimal? _iquantity;
        private decimal? _inum;
        private decimal? _iunitprice;
        private decimal? _imoney;
        private decimal? _itax;
        private decimal? _isum;
        private decimal? _idiscount;
        private decimal? _inatunitprice;
        private decimal? _inatmoney;
        private decimal? _inattax;
        private decimal? _inatsum;
        private decimal? _inatdiscount;
        private DateTime? _darrivedate;
        private string _cfree2;
        private string _cfree1;
        private string _cunitid;
        private string _cinvm_unit;
        private int? _igrouptype;
        private string _cgroupcode;
        private string _cinva_unit;
        private decimal? _iinvexchrate;
        private string _cinvdefine1;
        private string _cinvdefine2;
        private string _cinvdefine3;
        private string _cinvdefine4;
        private string _cinvdefine5;
        private string _cinvdefine6;
        private string _cinvdefine7;
        private string _cinvdefine8;
        private string _cinvdefine9;
        private string _cinvdefine10;
        private string _ccomunitcode;
        private int? _cinvdefine11;
        private int? _cinvdefine12;
        private decimal? _cinvdefine13;
        private decimal? _cinvdefine14;
        private DateTime? _cinvdefine15;
        private DateTime? _cinvdefine16;
        private string _cdefine22;
        private string _cdefine23;
        private string _cdefine24;
        private string _cdefine25;
        private decimal? _cdefine26;
        private decimal? _cdefine27;
        private string _cdefine28;
        private string _cdefine29;
        private string _cdefine30;
        private string _cdefine31;
        private string _cdefine32;
        private string _cdefine33;
        private int? _cdefine34;
        private int? _cdefine35;
        private DateTime? _cdefine36;
        private DateTime? _cdefine37;
        private decimal? _ipertaxrate;
        private string _citemcode;
        private string _citemname;
        private string _citem_class;
        private string _citem_name;
        private int? _ppcids;
        private Guid _contractrowguid;
        private string _cfree3;
        private string _cfree4;
        private string _cfree5;
        private string _cfree6;
        private string _cfree7;
        private string _cfree8;
        private string _cfree9;
        private string _cfree10;
        private decimal? _itaxprice;
        private int? _isosid;
        private int? _cinvauthid;
        private bool _btaxcost;
        private decimal? _iarrqty;
        private decimal? _iarrnum;
        private decimal? _iarrmoney;
        private decimal? _inatarrmoney;
        private decimal? _ireceivedqty;
        private decimal? _ireceivednum;
        private decimal? _ireceivedmoney;
        private decimal? _iinvqty;
        private decimal? _iinvnum;
        private decimal? _iinvmoney;
        private decimal? _inatinvmoney;
        private decimal? _ioritotal;
        private decimal? _itotal;
        private int _bgsp;
        private string _csource;
        private string _csocode;
        private string _contractcode;
        private string _contractrowno;
        private int? _irowno;
        private int _sotype;
        private string _sodid;
        private decimal? _iinvmpcost;
        private string _cbcloser;
        private int? _ippartid;
        private decimal? _ipquantity;
        private int? _iptoseq;
        private string _cveninvcode;
        private string _cveninvname;
        private string _cupsocode;
        private string _upsotype;
        private int _iordertype;
        private string _csoordercode;
        private int? _iorderseq;
        private int? _iorderdid;
        private string _cdemandmemo;
        private DateTime? _cbclosetime;
        private DateTime? _cbclosedate;
        private string _cbg_itemcode;
        private string _cbg_itemname;
        private string _cbg_caliberkey1;
        private string _cbg_caliberkeyname1;
        private string _cbg_caliberkey2;
        private string _cbg_caliberkeyname2;
        private string _cbg_caliberkey3;
        private string _cbg_caliberkeyname3;
        private string _cbg_calibercode1;
        private string _cbg_calibername1;
        private string _cbg_calibercode2;
        private string _cbg_calibername2;
        private string _cbg_calibercode3;
        private string _cbg_calibername3;
        private string _cbg_caliberkey4;
        private string _cbg_caliberkeyname4;
        private string _cbg_caliberkey5;
        private string _cbg_caliberkeyname5;
        private string _cbg_caliberkey6;
        private string _cbg_caliberkeyname6;
        private string _cbg_calibercode4;
        private string _cbg_calibername4;
        private string _cbg_calibercode5;
        private string _cbg_calibername5;
        private string _cbg_calibercode6;
        private string _cbg_calibername6;
        private int? _ibg_ctrl;
        private string _cbg_auditopinion;
        private decimal? _fexquantity;
        private decimal? _fexnum;
        private int? _ivouchrowno;
        private string _csrpolicy;
        private string _cxjspdids;
        private int _irequiretrackstyle;
        private int? _ipresentb;
        private string _cinvccode;
        private bool _binvtype;
        private bool _bservice;
        private string _cbmemo;
        private string _cbsysbarcode;
        private string _cplanmethod;
        private string _planlotnumber;
        private int? _bgift;
        private string _cfactorycode;
        private string _cfactoryname;
        private int? _gcsourceid;
        private int? _gcsourceids;
        private string _gcupcardnum;
        private int? _gcupid;
        private int? _gcupids;
        private string _yyc_invname;
        private decimal? _iorderamt_f;
        private decimal? _iorderamt;
        private decimal? _inrorderamt_f;
        private decimal? _inrorderamt;
        private string _csyssourceautoid;
        /// <summary>
        /// 
        /// </summary>
        public int id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? poid
        {
            set { _poid = value; }
            get { return _poid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? iappids
        {
            set { _iappids = value; }
            get { return _iappids; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvcode
        {
            set { _cinvcode = value; }
            get { return _cinvcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvname
        {
            set { _cinvname = value; }
            get { return _cinvname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvstd
        {
            set { _cinvstd = value; }
            get { return _cinvstd; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvaddcode
        {
            set { _cinvaddcode = value; }
            get { return _cinvaddcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iquotedprice
        {
            set { _iquotedprice = value; }
            get { return _iquotedprice; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iquantity
        {
            set { _iquantity = value; }
            get { return _iquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? inum
        {
            set { _inum = value; }
            get { return _inum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iunitprice
        {
            set { _iunitprice = value; }
            get { return _iunitprice; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? imoney
        {
            set { _imoney = value; }
            get { return _imoney; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? itax
        {
            set { _itax = value; }
            get { return _itax; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? isum
        {
            set { _isum = value; }
            get { return _isum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? idiscount
        {
            set { _idiscount = value; }
            get { return _idiscount; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? inatunitprice
        {
            set { _inatunitprice = value; }
            get { return _inatunitprice; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? inatmoney
        {
            set { _inatmoney = value; }
            get { return _inatmoney; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? inattax
        {
            set { _inattax = value; }
            get { return _inattax; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? inatsum
        {
            set { _inatsum = value; }
            get { return _inatsum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? inatdiscount
        {
            set { _inatdiscount = value; }
            get { return _inatdiscount; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? darrivedate
        {
            set { _darrivedate = value; }
            get { return _darrivedate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree2
        {
            set { _cfree2 = value; }
            get { return _cfree2; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree1
        {
            set { _cfree1 = value; }
            get { return _cfree1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cunitid
        {
            set { _cunitid = value; }
            get { return _cunitid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvm_unit
        {
            set { _cinvm_unit = value; }
            get { return _cinvm_unit; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? igrouptype
        {
            set { _igrouptype = value; }
            get { return _igrouptype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cgroupcode
        {
            set { _cgroupcode = value; }
            get { return _cgroupcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinva_unit
        {
            set { _cinva_unit = value; }
            get { return _cinva_unit; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iinvexchrate
        {
            set { _iinvexchrate = value; }
            get { return _iinvexchrate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine1
        {
            set { _cinvdefine1 = value; }
            get { return _cinvdefine1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine2
        {
            set { _cinvdefine2 = value; }
            get { return _cinvdefine2; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine3
        {
            set { _cinvdefine3 = value; }
            get { return _cinvdefine3; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine4
        {
            set { _cinvdefine4 = value; }
            get { return _cinvdefine4; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine5
        {
            set { _cinvdefine5 = value; }
            get { return _cinvdefine5; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine6
        {
            set { _cinvdefine6 = value; }
            get { return _cinvdefine6; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine7
        {
            set { _cinvdefine7 = value; }
            get { return _cinvdefine7; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine8
        {
            set { _cinvdefine8 = value; }
            get { return _cinvdefine8; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine9
        {
            set { _cinvdefine9 = value; }
            get { return _cinvdefine9; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvdefine10
        {
            set { _cinvdefine10 = value; }
            get { return _cinvdefine10; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string ccomunitcode
        {
            set { _ccomunitcode = value; }
            get { return _ccomunitcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cinvdefine11
        {
            set { _cinvdefine11 = value; }
            get { return _cinvdefine11; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cinvdefine12
        {
            set { _cinvdefine12 = value; }
            get { return _cinvdefine12; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cinvdefine13
        {
            set { _cinvdefine13 = value; }
            get { return _cinvdefine13; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cinvdefine14
        {
            set { _cinvdefine14 = value; }
            get { return _cinvdefine14; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cinvdefine15
        {
            set { _cinvdefine15 = value; }
            get { return _cinvdefine15; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cinvdefine16
        {
            set { _cinvdefine16 = value; }
            get { return _cinvdefine16; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine22
        {
            set { _cdefine22 = value; }
            get { return _cdefine22; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine23
        {
            set { _cdefine23 = value; }
            get { return _cdefine23; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine24
        {
            set { _cdefine24 = value; }
            get { return _cdefine24; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine25
        {
            set { _cdefine25 = value; }
            get { return _cdefine25; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cdefine26
        {
            set { _cdefine26 = value; }
            get { return _cdefine26; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? cdefine27
        {
            set { _cdefine27 = value; }
            get { return _cdefine27; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine28
        {
            set { _cdefine28 = value; }
            get { return _cdefine28; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine29
        {
            set { _cdefine29 = value; }
            get { return _cdefine29; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine30
        {
            set { _cdefine30 = value; }
            get { return _cdefine30; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine31
        {
            set { _cdefine31 = value; }
            get { return _cdefine31; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine32
        {
            set { _cdefine32 = value; }
            get { return _cdefine32; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdefine33
        {
            set { _cdefine33 = value; }
            get { return _cdefine33; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cdefine34
        {
            set { _cdefine34 = value; }
            get { return _cdefine34; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cdefine35
        {
            set { _cdefine35 = value; }
            get { return _cdefine35; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cdefine36
        {
            set { _cdefine36 = value; }
            get { return _cdefine36; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cdefine37
        {
            set { _cdefine37 = value; }
            get { return _cdefine37; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? ipertaxrate
        {
            set { _ipertaxrate = value; }
            get { return _ipertaxrate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string citemcode
        {
            set { _citemcode = value; }
            get { return _citemcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string citemname
        {
            set { _citemname = value; }
            get { return _citemname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string citem_class
        {
            set { _citem_class = value; }
            get { return _citem_class; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string citem_name
        {
            set { _citem_name = value; }
            get { return _citem_name; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? ppcids
        {
            set { _ppcids = value; }
            get { return _ppcids; }
        }
        /// <summary>
        /// 
        /// </summary>
        public Guid contractrowguid
        {
            set { _contractrowguid = value; }
            get { return _contractrowguid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree3
        {
            set { _cfree3 = value; }
            get { return _cfree3; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree4
        {
            set { _cfree4 = value; }
            get { return _cfree4; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree5
        {
            set { _cfree5 = value; }
            get { return _cfree5; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree6
        {
            set { _cfree6 = value; }
            get { return _cfree6; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree7
        {
            set { _cfree7 = value; }
            get { return _cfree7; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree8
        {
            set { _cfree8 = value; }
            get { return _cfree8; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree9
        {
            set { _cfree9 = value; }
            get { return _cfree9; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfree10
        {
            set { _cfree10 = value; }
            get { return _cfree10; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? itaxprice
        {
            set { _itaxprice = value; }
            get { return _itaxprice; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? isosid
        {
            set { _isosid = value; }
            get { return _isosid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? cinvauthid
        {
            set { _cinvauthid = value; }
            get { return _cinvauthid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool btaxcost
        {
            set { _btaxcost = value; }
            get { return _btaxcost; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iarrqty
        {
            set { _iarrqty = value; }
            get { return _iarrqty; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iarrnum
        {
            set { _iarrnum = value; }
            get { return _iarrnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iarrmoney
        {
            set { _iarrmoney = value; }
            get { return _iarrmoney; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? inatarrmoney
        {
            set { _inatarrmoney = value; }
            get { return _inatarrmoney; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? ireceivedqty
        {
            set { _ireceivedqty = value; }
            get { return _ireceivedqty; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? ireceivednum
        {
            set { _ireceivednum = value; }
            get { return _ireceivednum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? ireceivedmoney
        {
            set { _ireceivedmoney = value; }
            get { return _ireceivedmoney; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iinvqty
        {
            set { _iinvqty = value; }
            get { return _iinvqty; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iinvnum
        {
            set { _iinvnum = value; }
            get { return _iinvnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iinvmoney
        {
            set { _iinvmoney = value; }
            get { return _iinvmoney; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? inatinvmoney
        {
            set { _inatinvmoney = value; }
            get { return _inatinvmoney; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? ioritotal
        {
            set { _ioritotal = value; }
            get { return _ioritotal; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? itotal
        {
            set { _itotal = value; }
            get { return _itotal; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int bgsp
        {
            set { _bgsp = value; }
            get { return _bgsp; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string csource
        {
            set { _csource = value; }
            get { return _csource; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string csocode
        {
            set { _csocode = value; }
            get { return _csocode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string contractcode
        {
            set { _contractcode = value; }
            get { return _contractcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string contractrowno
        {
            set { _contractrowno = value; }
            get { return _contractrowno; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? irowno
        {
            set { _irowno = value; }
            get { return _irowno; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int sotype
        {
            set { _sotype = value; }
            get { return _sotype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string sodid
        {
            set { _sodid = value; }
            get { return _sodid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iinvmpcost
        {
            set { _iinvmpcost = value; }
            get { return _iinvmpcost; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbcloser
        {
            set { _cbcloser = value; }
            get { return _cbcloser; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? ippartid
        {
            set { _ippartid = value; }
            get { return _ippartid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? ipquantity
        {
            set { _ipquantity = value; }
            get { return _ipquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? iptoseq
        {
            set { _iptoseq = value; }
            get { return _iptoseq; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cveninvcode
        {
            set { _cveninvcode = value; }
            get { return _cveninvcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cveninvname
        {
            set { _cveninvname = value; }
            get { return _cveninvname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cupsocode
        {
            set { _cupsocode = value; }
            get { return _cupsocode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string upsotype
        {
            set { _upsotype = value; }
            get { return _upsotype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int iordertype
        {
            set { _iordertype = value; }
            get { return _iordertype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string csoordercode
        {
            set { _csoordercode = value; }
            get { return _csoordercode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? iorderseq
        {
            set { _iorderseq = value; }
            get { return _iorderseq; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? iorderdid
        {
            set { _iorderdid = value; }
            get { return _iorderdid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cdemandmemo
        {
            set { _cdemandmemo = value; }
            get { return _cdemandmemo; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cbclosetime
        {
            set { _cbclosetime = value; }
            get { return _cbclosetime; }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? cbclosedate
        {
            set { _cbclosedate = value; }
            get { return _cbclosedate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_itemcode
        {
            set { _cbg_itemcode = value; }
            get { return _cbg_itemcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_itemname
        {
            set { _cbg_itemname = value; }
            get { return _cbg_itemname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkey1
        {
            set { _cbg_caliberkey1 = value; }
            get { return _cbg_caliberkey1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkeyname1
        {
            set { _cbg_caliberkeyname1 = value; }
            get { return _cbg_caliberkeyname1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkey2
        {
            set { _cbg_caliberkey2 = value; }
            get { return _cbg_caliberkey2; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkeyname2
        {
            set { _cbg_caliberkeyname2 = value; }
            get { return _cbg_caliberkeyname2; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkey3
        {
            set { _cbg_caliberkey3 = value; }
            get { return _cbg_caliberkey3; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkeyname3
        {
            set { _cbg_caliberkeyname3 = value; }
            get { return _cbg_caliberkeyname3; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibercode1
        {
            set { _cbg_calibercode1 = value; }
            get { return _cbg_calibercode1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibername1
        {
            set { _cbg_calibername1 = value; }
            get { return _cbg_calibername1; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibercode2
        {
            set { _cbg_calibercode2 = value; }
            get { return _cbg_calibercode2; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibername2
        {
            set { _cbg_calibername2 = value; }
            get { return _cbg_calibername2; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibercode3
        {
            set { _cbg_calibercode3 = value; }
            get { return _cbg_calibercode3; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibername3
        {
            set { _cbg_calibername3 = value; }
            get { return _cbg_calibername3; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkey4
        {
            set { _cbg_caliberkey4 = value; }
            get { return _cbg_caliberkey4; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkeyname4
        {
            set { _cbg_caliberkeyname4 = value; }
            get { return _cbg_caliberkeyname4; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkey5
        {
            set { _cbg_caliberkey5 = value; }
            get { return _cbg_caliberkey5; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkeyname5
        {
            set { _cbg_caliberkeyname5 = value; }
            get { return _cbg_caliberkeyname5; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkey6
        {
            set { _cbg_caliberkey6 = value; }
            get { return _cbg_caliberkey6; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_caliberkeyname6
        {
            set { _cbg_caliberkeyname6 = value; }
            get { return _cbg_caliberkeyname6; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibercode4
        {
            set { _cbg_calibercode4 = value; }
            get { return _cbg_calibercode4; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibername4
        {
            set { _cbg_calibername4 = value; }
            get { return _cbg_calibername4; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibercode5
        {
            set { _cbg_calibercode5 = value; }
            get { return _cbg_calibercode5; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibername5
        {
            set { _cbg_calibername5 = value; }
            get { return _cbg_calibername5; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibercode6
        {
            set { _cbg_calibercode6 = value; }
            get { return _cbg_calibercode6; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_calibername6
        {
            set { _cbg_calibername6 = value; }
            get { return _cbg_calibername6; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? ibg_ctrl
        {
            set { _ibg_ctrl = value; }
            get { return _ibg_ctrl; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbg_auditopinion
        {
            set { _cbg_auditopinion = value; }
            get { return _cbg_auditopinion; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fexquantity
        {
            set { _fexquantity = value; }
            get { return _fexquantity; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? fexnum
        {
            set { _fexnum = value; }
            get { return _fexnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? ivouchrowno
        {
            set { _ivouchrowno = value; }
            get { return _ivouchrowno; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string csrpolicy
        {
            set { _csrpolicy = value; }
            get { return _csrpolicy; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cxjspdids
        {
            set { _cxjspdids = value; }
            get { return _cxjspdids; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int irequiretrackstyle
        {
            set { _irequiretrackstyle = value; }
            get { return _irequiretrackstyle; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? ipresentb
        {
            set { _ipresentb = value; }
            get { return _ipresentb; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cinvccode
        {
            set { _cinvccode = value; }
            get { return _cinvccode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool binvtype
        {
            set { _binvtype = value; }
            get { return _binvtype; }
        }
        /// <summary>
        /// 
        /// </summary>
        public bool bservice
        {
            set { _bservice = value; }
            get { return _bservice; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbmemo
        {
            set { _cbmemo = value; }
            get { return _cbmemo; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cbsysbarcode
        {
            set { _cbsysbarcode = value; }
            get { return _cbsysbarcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cplanmethod
        {
            set { _cplanmethod = value; }
            get { return _cplanmethod; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string planlotnumber
        {
            set { _planlotnumber = value; }
            get { return _planlotnumber; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? bgift
        {
            set { _bgift = value; }
            get { return _bgift; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfactorycode
        {
            set { _cfactorycode = value; }
            get { return _cfactorycode; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string cfactoryname
        {
            set { _cfactoryname = value; }
            get { return _cfactoryname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? gcsourceid
        {
            set { _gcsourceid = value; }
            get { return _gcsourceid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? gcsourceids
        {
            set { _gcsourceids = value; }
            get { return _gcsourceids; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string gcupcardnum
        {
            set { _gcupcardnum = value; }
            get { return _gcupcardnum; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? gcupid
        {
            set { _gcupid = value; }
            get { return _gcupid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? gcupids
        {
            set { _gcupids = value; }
            get { return _gcupids; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string yyc_invname
        {
            set { _yyc_invname = value; }
            get { return _yyc_invname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iOrderAmt_f
        {
            set { _iorderamt_f = value; }
            get { return _iorderamt_f; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iOrderAmt
        {
            set { _iorderamt = value; }
            get { return _iorderamt; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iNROrderAmt_f
        {
            set { _inrorderamt_f = value; }
            get { return _inrorderamt_f; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? iNROrderAmt
        {
            set { _inrorderamt = value; }
            get { return _inrorderamt; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string csyssourceautoid
        {
            set { _csyssourceautoid = value; }
            get { return _csyssourceautoid; }
        }
        #endregion Model


        #region  Method

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int id, int poid, int iappids, string cinvcode, string cinvname, string cinvstd, string cinvaddcode, decimal iquotedprice, decimal iquantity, decimal inum, decimal iunitprice, decimal imoney, decimal itax, decimal isum, decimal idiscount, decimal inatunitprice, decimal inatmoney, decimal inattax, decimal inatsum, decimal inatdiscount, DateTime darrivedate, string cfree2, string cfree1, string cunitid, string cinvm_unit, int igrouptype, string cgroupcode, string cinva_unit, decimal iinvexchrate, string cinvdefine1, string cinvdefine2, string cinvdefine3, string cinvdefine4, string cinvdefine5, string cinvdefine6, string cinvdefine7, string cinvdefine8, string cinvdefine9, string cinvdefine10, string ccomunitcode, int cinvdefine11, int cinvdefine12, decimal cinvdefine13, decimal cinvdefine14, DateTime cinvdefine15, DateTime cinvdefine16, string cdefine22, string cdefine23, string cdefine24, string cdefine25, decimal cdefine26, decimal cdefine27, string cdefine28, string cdefine29, string cdefine30, string cdefine31, string cdefine32, string cdefine33, int cdefine34, int cdefine35, DateTime cdefine36, DateTime cdefine37, decimal ipertaxrate, string citemcode, string citemname, string citem_class, string citem_name, int ppcids, Guid contractrowguid, string cfree3, string cfree4, string cfree5, string cfree6, string cfree7, string cfree8, string cfree9, string cfree10, decimal itaxprice, int isosid, int cinvauthid, bool btaxcost, decimal iarrqty, decimal iarrnum, decimal iarrmoney, decimal inatarrmoney, decimal ireceivedqty, decimal ireceivednum, decimal ireceivedmoney, decimal iinvqty, decimal iinvnum, decimal iinvmoney, decimal inatinvmoney, decimal ioritotal, decimal itotal, int bgsp, string csource, string csocode, string contractcode, string contractrowno, int irowno, int sotype, string sodid, decimal iinvmpcost, string cbcloser, int ippartid, decimal ipquantity, int iptoseq, string cveninvcode, string cveninvname, string cupsocode, string upsotype, int iordertype, string csoordercode, int iorderseq, int iorderdid, string cdemandmemo, DateTime cbclosetime, DateTime cbclosedate, string cbg_itemcode, string cbg_itemname, string cbg_caliberkey1, string cbg_caliberkeyname1, string cbg_caliberkey2, string cbg_caliberkeyname2, string cbg_caliberkey3, string cbg_caliberkeyname3, string cbg_calibercode1, string cbg_calibername1, string cbg_calibercode2, string cbg_calibername2, string cbg_calibercode3, string cbg_calibername3, string cbg_caliberkey4, string cbg_caliberkeyname4, string cbg_caliberkey5, string cbg_caliberkeyname5, string cbg_caliberkey6, string cbg_caliberkeyname6, string cbg_calibercode4, string cbg_calibername4, string cbg_calibercode5, string cbg_calibername5, string cbg_calibercode6, string cbg_calibername6, int ibg_ctrl, string cbg_auditopinion, decimal fexquantity, decimal fexnum, int ivouchrowno, string csrpolicy, string cxjspdids, int irequiretrackstyle, int ipresentb, string cinvccode, bool binvtype, bool bservice, string cbmemo, string cbsysbarcode, string cplanmethod, string planlotnumber, int bgift, string cfactorycode, string cfactoryname, int gcsourceid, int gcsourceids, string gcupcardnum, int gcupid, int gcupids, string yyc_invname, decimal iOrderAmt_f, decimal iOrderAmt, decimal iNROrderAmt_f, decimal iNROrderAmt, string csyssourceautoid)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from [zpurpotail]");
            strSql.Append(" where id=@id and poid=@poid and iappids=@iappids and cinvcode=@cinvcode and cinvname=@cinvname and cinvstd=@cinvstd and cinvaddcode=@cinvaddcode and iquotedprice=@iquotedprice and iquantity=@iquantity and inum=@inum and iunitprice=@iunitprice and imoney=@imoney and itax=@itax and isum=@isum and idiscount=@idiscount and inatunitprice=@inatunitprice and inatmoney=@inatmoney and inattax=@inattax and inatsum=@inatsum and inatdiscount=@inatdiscount and darrivedate=@darrivedate and cfree2=@cfree2 and cfree1=@cfree1 and cunitid=@cunitid and cinvm_unit=@cinvm_unit and igrouptype=@igrouptype and cgroupcode=@cgroupcode and cinva_unit=@cinva_unit and iinvexchrate=@iinvexchrate and cinvdefine1=@cinvdefine1 and cinvdefine2=@cinvdefine2 and cinvdefine3=@cinvdefine3 and cinvdefine4=@cinvdefine4 and cinvdefine5=@cinvdefine5 and cinvdefine6=@cinvdefine6 and cinvdefine7=@cinvdefine7 and cinvdefine8=@cinvdefine8 and cinvdefine9=@cinvdefine9 and cinvdefine10=@cinvdefine10 and ccomunitcode=@ccomunitcode and cinvdefine11=@cinvdefine11 and cinvdefine12=@cinvdefine12 and cinvdefine13=@cinvdefine13 and cinvdefine14=@cinvdefine14 and cinvdefine15=@cinvdefine15 and cinvdefine16=@cinvdefine16 and cdefine22=@cdefine22 and cdefine23=@cdefine23 and cdefine24=@cdefine24 and cdefine25=@cdefine25 and cdefine26=@cdefine26 and cdefine27=@cdefine27 and cdefine28=@cdefine28 and cdefine29=@cdefine29 and cdefine30=@cdefine30 and cdefine31=@cdefine31 and cdefine32=@cdefine32 and cdefine33=@cdefine33 and cdefine34=@cdefine34 and cdefine35=@cdefine35 and cdefine36=@cdefine36 and cdefine37=@cdefine37 and ipertaxrate=@ipertaxrate and citemcode=@citemcode and citemname=@citemname and citem_class=@citem_class and citem_name=@citem_name and ppcids=@ppcids and contractrowguid=@contractrowguid and cfree3=@cfree3 and cfree4=@cfree4 and cfree5=@cfree5 and cfree6=@cfree6 and cfree7=@cfree7 and cfree8=@cfree8 and cfree9=@cfree9 and cfree10=@cfree10 and itaxprice=@itaxprice and isosid=@isosid and cinvauthid=@cinvauthid and btaxcost=@btaxcost and iarrqty=@iarrqty and iarrnum=@iarrnum and iarrmoney=@iarrmoney and inatarrmoney=@inatarrmoney and ireceivedqty=@ireceivedqty and ireceivednum=@ireceivednum and ireceivedmoney=@ireceivedmoney and iinvqty=@iinvqty and iinvnum=@iinvnum and iinvmoney=@iinvmoney and inatinvmoney=@inatinvmoney and ioritotal=@ioritotal and itotal=@itotal and bgsp=@bgsp and csource=@csource and csocode=@csocode and contractcode=@contractcode and contractrowno=@contractrowno and irowno=@irowno and sotype=@sotype and sodid=@sodid and iinvmpcost=@iinvmpcost and cbcloser=@cbcloser and ippartid=@ippartid and ipquantity=@ipquantity and iptoseq=@iptoseq and cveninvcode=@cveninvcode and cveninvname=@cveninvname and cupsocode=@cupsocode and upsotype=@upsotype and iordertype=@iordertype and csoordercode=@csoordercode and iorderseq=@iorderseq and iorderdid=@iorderdid and cdemandmemo=@cdemandmemo and cbclosetime=@cbclosetime and cbclosedate=@cbclosedate and cbg_itemcode=@cbg_itemcode and cbg_itemname=@cbg_itemname and cbg_caliberkey1=@cbg_caliberkey1 and cbg_caliberkeyname1=@cbg_caliberkeyname1 and cbg_caliberkey2=@cbg_caliberkey2 and cbg_caliberkeyname2=@cbg_caliberkeyname2 and cbg_caliberkey3=@cbg_caliberkey3 and cbg_caliberkeyname3=@cbg_caliberkeyname3 and cbg_calibercode1=@cbg_calibercode1 and cbg_calibername1=@cbg_calibername1 and cbg_calibercode2=@cbg_calibercode2 and cbg_calibername2=@cbg_calibername2 and cbg_calibercode3=@cbg_calibercode3 and cbg_calibername3=@cbg_calibername3 and cbg_caliberkey4=@cbg_caliberkey4 and cbg_caliberkeyname4=@cbg_caliberkeyname4 and cbg_caliberkey5=@cbg_caliberkey5 and cbg_caliberkeyname5=@cbg_caliberkeyname5 and cbg_caliberkey6=@cbg_caliberkey6 and cbg_caliberkeyname6=@cbg_caliberkeyname6 and cbg_calibercode4=@cbg_calibercode4 and cbg_calibername4=@cbg_calibername4 and cbg_calibercode5=@cbg_calibercode5 and cbg_calibername5=@cbg_calibername5 and cbg_calibercode6=@cbg_calibercode6 and cbg_calibername6=@cbg_calibername6 and ibg_ctrl=@ibg_ctrl and cbg_auditopinion=@cbg_auditopinion and fexquantity=@fexquantity and fexnum=@fexnum and ivouchrowno=@ivouchrowno and csrpolicy=@csrpolicy and cxjspdids=@cxjspdids and irequiretrackstyle=@irequiretrackstyle and ipresentb=@ipresentb and cinvccode=@cinvccode and binvtype=@binvtype and bservice=@bservice and cbmemo=@cbmemo and cbsysbarcode=@cbsysbarcode and cplanmethod=@cplanmethod and planlotnumber=@planlotnumber and bgift=@bgift and cfactorycode=@cfactorycode and cfactoryname=@cfactoryname and gcsourceid=@gcsourceid and gcsourceids=@gcsourceids and gcupcardnum=@gcupcardnum and gcupid=@gcupid and gcupids=@gcupids and yyc_invname=@yyc_invname and iOrderAmt_f=@iOrderAmt_f and iOrderAmt=@iOrderAmt and iNROrderAmt_f=@iNROrderAmt_f and iNROrderAmt=@iNROrderAmt and csyssourceautoid=@csyssourceautoid ");

            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@poid", SqlDbType.Int,4),
                    new SqlParameter("@iappids", SqlDbType.Int,4),
                    new SqlParameter("@cinvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvstd", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvaddcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iquotedprice", SqlDbType.Decimal),
                    new SqlParameter("@iquantity", SqlDbType.Decimal),
                    new SqlParameter("@inum", SqlDbType.Decimal),
                    new SqlParameter("@iunitprice", SqlDbType.Decimal),
                    new SqlParameter("@imoney", SqlDbType.Money),
                    new SqlParameter("@itax", SqlDbType.Money),
                    new SqlParameter("@isum", SqlDbType.Money),
                    new SqlParameter("@idiscount", SqlDbType.Money),
                    new SqlParameter("@inatunitprice", SqlDbType.Decimal),
                    new SqlParameter("@inatmoney", SqlDbType.Money),
                    new SqlParameter("@inattax", SqlDbType.Money),
                    new SqlParameter("@inatsum", SqlDbType.Money),
                    new SqlParameter("@inatdiscount", SqlDbType.Money),
                    new SqlParameter("@darrivedate", SqlDbType.DateTime),
                    new SqlParameter("@cfree2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cunitid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvm_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@igrouptype", SqlDbType.TinyInt),
                    new SqlParameter("@cgroupcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinva_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iinvexchrate", SqlDbType.Decimal),
                    new SqlParameter("@cinvdefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccomunitcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine11", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine12", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine13", SqlDbType.Float),
                    new SqlParameter("@cinvdefine14", SqlDbType.Float),
                    new SqlParameter("@cinvdefine15", SqlDbType.DateTime),
                    new SqlParameter("@cinvdefine16", SqlDbType.DateTime),
                    new SqlParameter("@cdefine22", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine23", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine24", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine25", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine26", SqlDbType.Float),
                    new SqlParameter("@cdefine27", SqlDbType.Float),
                    new SqlParameter("@cdefine28", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine29", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine30", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine31", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine32", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine33", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine34", SqlDbType.Int,4),
                    new SqlParameter("@cdefine35", SqlDbType.Int,4),
                    new SqlParameter("@cdefine36", SqlDbType.DateTime),
                    new SqlParameter("@cdefine37", SqlDbType.DateTime),
                    new SqlParameter("@ipertaxrate", SqlDbType.Decimal),
                    new SqlParameter("@citemcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citemname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_class", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_name", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ppcids", SqlDbType.Int,4),
                    new SqlParameter("@contractrowguid", SqlDbType.UniqueIdentifier),
                    new SqlParameter("@cfree3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@itaxprice", SqlDbType.Decimal),
                    new SqlParameter("@isosid", SqlDbType.Int,4),
                    new SqlParameter("@cinvauthid", SqlDbType.Int,4),
                    new SqlParameter("@btaxcost", SqlDbType.Bit,1),
                    new SqlParameter("@iarrqty", SqlDbType.Decimal),
                    new SqlParameter("@iarrnum", SqlDbType.Decimal),
                    new SqlParameter("@iarrmoney", SqlDbType.Money),
                    new SqlParameter("@inatarrmoney", SqlDbType.Money),
                    new SqlParameter("@ireceivedqty", SqlDbType.Decimal),
                    new SqlParameter("@ireceivednum", SqlDbType.Decimal),
                    new SqlParameter("@ireceivedmoney", SqlDbType.Money),
                    new SqlParameter("@iinvqty", SqlDbType.Decimal),
                    new SqlParameter("@iinvnum", SqlDbType.Decimal),
                    new SqlParameter("@iinvmoney", SqlDbType.Money),
                    new SqlParameter("@inatinvmoney", SqlDbType.Money),
                    new SqlParameter("@ioritotal", SqlDbType.Money),
                    new SqlParameter("@itotal", SqlDbType.Money),
                    new SqlParameter("@bgsp", SqlDbType.TinyInt),
                    new SqlParameter("@csource", SqlDbType.NVarChar,-1),
                    new SqlParameter("@csocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@contractcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@contractrowno", SqlDbType.NVarChar,-1),
                    new SqlParameter("@irowno", SqlDbType.Int,4),
                    new SqlParameter("@sotype", SqlDbType.TinyInt),
                    new SqlParameter("@sodid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iinvmpcost", SqlDbType.Decimal),
                    new SqlParameter("@cbcloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ippartid", SqlDbType.Int,4),
                    new SqlParameter("@ipquantity", SqlDbType.Decimal),
                    new SqlParameter("@iptoseq", SqlDbType.Int,4),
                    new SqlParameter("@cveninvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cveninvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cupsocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@upsotype", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iordertype", SqlDbType.TinyInt),
                    new SqlParameter("@csoordercode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iorderseq", SqlDbType.Int,4),
                    new SqlParameter("@iorderdid", SqlDbType.Int,4),
                    new SqlParameter("@cdemandmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbclosetime", SqlDbType.DateTime),
                    new SqlParameter("@cbclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cbg_itemcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_itemname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ibg_ctrl", SqlDbType.TinyInt),
                    new SqlParameter("@cbg_auditopinion", SqlDbType.NVarChar,-1),
                    new SqlParameter("@fexquantity", SqlDbType.Decimal),
                    new SqlParameter("@fexnum", SqlDbType.Decimal),
                    new SqlParameter("@ivouchrowno", SqlDbType.Int,4),
                    new SqlParameter("@csrpolicy", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cxjspdids", SqlDbType.NVarChar,-1),
                    new SqlParameter("@irequiretrackstyle", SqlDbType.Int,4),
                    new SqlParameter("@ipresentb", SqlDbType.Int,4),
                    new SqlParameter("@cinvccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@binvtype", SqlDbType.Bit,1),
                    new SqlParameter("@bservice", SqlDbType.Bit,1),
                    new SqlParameter("@cbmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbsysbarcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cplanmethod", SqlDbType.NVarChar,-1),
                    new SqlParameter("@planlotnumber", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bgift", SqlDbType.SmallInt),
                    new SqlParameter("@cfactorycode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfactoryname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@gcsourceid", SqlDbType.Int,4),
                    new SqlParameter("@gcsourceids", SqlDbType.Int,4),
                    new SqlParameter("@gcupcardnum", SqlDbType.NVarChar,-1),
                    new SqlParameter("@gcupid", SqlDbType.Int,4),
                    new SqlParameter("@gcupids", SqlDbType.Int,4),
                    new SqlParameter("@yyc_invname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iOrderAmt_f", SqlDbType.Money),
                    new SqlParameter("@iOrderAmt", SqlDbType.Money),
                    new SqlParameter("@iNROrderAmt_f", SqlDbType.Money),
                    new SqlParameter("@iNROrderAmt", SqlDbType.Money),
                    new SqlParameter("@csyssourceautoid", SqlDbType.NVarChar,-1)};
            parameters[0].Value = id;
            parameters[1].Value = poid;
            parameters[2].Value = iappids;
            parameters[3].Value = cinvcode;
            parameters[4].Value = cinvname;
            parameters[5].Value = cinvstd;
            parameters[6].Value = cinvaddcode;
            parameters[7].Value = iquotedprice;
            parameters[8].Value = iquantity;
            parameters[9].Value = inum;
            parameters[10].Value = iunitprice;
            parameters[11].Value = imoney;
            parameters[12].Value = itax;
            parameters[13].Value = isum;
            parameters[14].Value = idiscount;
            parameters[15].Value = inatunitprice;
            parameters[16].Value = inatmoney;
            parameters[17].Value = inattax;
            parameters[18].Value = inatsum;
            parameters[19].Value = inatdiscount;
            parameters[20].Value = darrivedate;
            parameters[21].Value = cfree2;
            parameters[22].Value = cfree1;
            parameters[23].Value = cunitid;
            parameters[24].Value = cinvm_unit;
            parameters[25].Value = igrouptype;
            parameters[26].Value = cgroupcode;
            parameters[27].Value = cinva_unit;
            parameters[28].Value = iinvexchrate;
            parameters[29].Value = cinvdefine1;
            parameters[30].Value = cinvdefine2;
            parameters[31].Value = cinvdefine3;
            parameters[32].Value = cinvdefine4;
            parameters[33].Value = cinvdefine5;
            parameters[34].Value = cinvdefine6;
            parameters[35].Value = cinvdefine7;
            parameters[36].Value = cinvdefine8;
            parameters[37].Value = cinvdefine9;
            parameters[38].Value = cinvdefine10;
            parameters[39].Value = ccomunitcode;
            parameters[40].Value = cinvdefine11;
            parameters[41].Value = cinvdefine12;
            parameters[42].Value = cinvdefine13;
            parameters[43].Value = cinvdefine14;
            parameters[44].Value = cinvdefine15;
            parameters[45].Value = cinvdefine16;
            parameters[46].Value = cdefine22;
            parameters[47].Value = cdefine23;
            parameters[48].Value = cdefine24;
            parameters[49].Value = cdefine25;
            parameters[50].Value = cdefine26;
            parameters[51].Value = cdefine27;
            parameters[52].Value = cdefine28;
            parameters[53].Value = cdefine29;
            parameters[54].Value = cdefine30;
            parameters[55].Value = cdefine31;
            parameters[56].Value = cdefine32;
            parameters[57].Value = cdefine33;
            parameters[58].Value = cdefine34;
            parameters[59].Value = cdefine35;
            parameters[60].Value = cdefine36;
            parameters[61].Value = cdefine37;
            parameters[62].Value = ipertaxrate;
            parameters[63].Value = citemcode;
            parameters[64].Value = citemname;
            parameters[65].Value = citem_class;
            parameters[66].Value = citem_name;
            parameters[67].Value = ppcids;
            parameters[68].Value = contractrowguid;
            parameters[69].Value = cfree3;
            parameters[70].Value = cfree4;
            parameters[71].Value = cfree5;
            parameters[72].Value = cfree6;
            parameters[73].Value = cfree7;
            parameters[74].Value = cfree8;
            parameters[75].Value = cfree9;
            parameters[76].Value = cfree10;
            parameters[77].Value = itaxprice;
            parameters[78].Value = isosid;
            parameters[79].Value = cinvauthid;
            parameters[80].Value = btaxcost;
            parameters[81].Value = iarrqty;
            parameters[82].Value = iarrnum;
            parameters[83].Value = iarrmoney;
            parameters[84].Value = inatarrmoney;
            parameters[85].Value = ireceivedqty;
            parameters[86].Value = ireceivednum;
            parameters[87].Value = ireceivedmoney;
            parameters[88].Value = iinvqty;
            parameters[89].Value = iinvnum;
            parameters[90].Value = iinvmoney;
            parameters[91].Value = inatinvmoney;
            parameters[92].Value = ioritotal;
            parameters[93].Value = itotal;
            parameters[94].Value = bgsp;
            parameters[95].Value = csource;
            parameters[96].Value = csocode;
            parameters[97].Value = contractcode;
            parameters[98].Value = contractrowno;
            parameters[99].Value = irowno;
            parameters[100].Value = sotype;
            parameters[101].Value = sodid;
            parameters[102].Value = iinvmpcost;
            parameters[103].Value = cbcloser;
            parameters[104].Value = ippartid;
            parameters[105].Value = ipquantity;
            parameters[106].Value = iptoseq;
            parameters[107].Value = cveninvcode;
            parameters[108].Value = cveninvname;
            parameters[109].Value = cupsocode;
            parameters[110].Value = upsotype;
            parameters[111].Value = iordertype;
            parameters[112].Value = csoordercode;
            parameters[113].Value = iorderseq;
            parameters[114].Value = iorderdid;
            parameters[115].Value = cdemandmemo;
            parameters[116].Value = cbclosetime;
            parameters[117].Value = cbclosedate;
            parameters[118].Value = cbg_itemcode;
            parameters[119].Value = cbg_itemname;
            parameters[120].Value = cbg_caliberkey1;
            parameters[121].Value = cbg_caliberkeyname1;
            parameters[122].Value = cbg_caliberkey2;
            parameters[123].Value = cbg_caliberkeyname2;
            parameters[124].Value = cbg_caliberkey3;
            parameters[125].Value = cbg_caliberkeyname3;
            parameters[126].Value = cbg_calibercode1;
            parameters[127].Value = cbg_calibername1;
            parameters[128].Value = cbg_calibercode2;
            parameters[129].Value = cbg_calibername2;
            parameters[130].Value = cbg_calibercode3;
            parameters[131].Value = cbg_calibername3;
            parameters[132].Value = cbg_caliberkey4;
            parameters[133].Value = cbg_caliberkeyname4;
            parameters[134].Value = cbg_caliberkey5;
            parameters[135].Value = cbg_caliberkeyname5;
            parameters[136].Value = cbg_caliberkey6;
            parameters[137].Value = cbg_caliberkeyname6;
            parameters[138].Value = cbg_calibercode4;
            parameters[139].Value = cbg_calibername4;
            parameters[140].Value = cbg_calibercode5;
            parameters[141].Value = cbg_calibername5;
            parameters[142].Value = cbg_calibercode6;
            parameters[143].Value = cbg_calibername6;
            parameters[144].Value = ibg_ctrl;
            parameters[145].Value = cbg_auditopinion;
            parameters[146].Value = fexquantity;
            parameters[147].Value = fexnum;
            parameters[148].Value = ivouchrowno;
            parameters[149].Value = csrpolicy;
            parameters[150].Value = cxjspdids;
            parameters[151].Value = irequiretrackstyle;
            parameters[152].Value = ipresentb;
            parameters[153].Value = cinvccode;
            parameters[154].Value = binvtype;
            parameters[155].Value = bservice;
            parameters[156].Value = cbmemo;
            parameters[157].Value = cbsysbarcode;
            parameters[158].Value = cplanmethod;
            parameters[159].Value = planlotnumber;
            parameters[160].Value = bgift;
            parameters[161].Value = cfactorycode;
            parameters[162].Value = cfactoryname;
            parameters[163].Value = gcsourceid;
            parameters[164].Value = gcsourceids;
            parameters[165].Value = gcupcardnum;
            parameters[166].Value = gcupid;
            parameters[167].Value = gcupids;
            parameters[168].Value = yyc_invname;
            parameters[169].Value = iOrderAmt_f;
            parameters[170].Value = iOrderAmt;
            parameters[171].Value = iNROrderAmt_f;
            parameters[172].Value = iNROrderAmt;
            parameters[173].Value = csyssourceautoid;

            return DbHelperSQL.Exists(strSql.ToString(), parameters);
        }


        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(string tablename)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into "+ tablename +" (");
            strSql.Append("id,poid,iappids,cinvcode,cinvname,cinvstd,cinvaddcode,iquotedprice,iquantity,inum,iunitprice,imoney,itax,isum,idiscount,inatunitprice,inatmoney,inattax,inatsum,inatdiscount,darrivedate,cfree2,cfree1,cunitid,cinvm_unit,igrouptype,cgroupcode,cinva_unit,iinvexchrate,cinvdefine1,cinvdefine2,cinvdefine3,cinvdefine4,cinvdefine5,cinvdefine6,cinvdefine7,cinvdefine8,cinvdefine9,cinvdefine10,ccomunitcode,cinvdefine11,cinvdefine12,cinvdefine13,cinvdefine14,cinvdefine15,cinvdefine16,cdefine22,cdefine23,cdefine24,cdefine25,cdefine26,cdefine27,cdefine28,cdefine29,cdefine30,cdefine31,cdefine32,cdefine33,cdefine34,cdefine35,cdefine36,cdefine37,ipertaxrate,citemcode,citemname,citem_class,citem_name,ppcids,contractrowguid,cfree3,cfree4,cfree5,cfree6,cfree7,cfree8,cfree9,cfree10,itaxprice,isosid,cinvauthid,btaxcost,iarrqty,iarrnum,iarrmoney,inatarrmoney,ireceivedqty,ireceivednum,ireceivedmoney,iinvqty,iinvnum,iinvmoney,inatinvmoney,ioritotal,itotal,bgsp,csource,csocode,contractcode,contractrowno,irowno,sotype,sodid,iinvmpcost,cbcloser,ippartid,ipquantity,iptoseq,cveninvcode,cveninvname,cupsocode,upsotype,iordertype,csoordercode,iorderseq,iorderdid,cdemandmemo,cbclosetime,cbclosedate,cbg_itemcode,cbg_itemname,cbg_caliberkey1,cbg_caliberkeyname1,cbg_caliberkey2,cbg_caliberkeyname2,cbg_caliberkey3,cbg_caliberkeyname3,cbg_calibercode1,cbg_calibername1,cbg_calibercode2,cbg_calibername2,cbg_calibercode3,cbg_calibername3,cbg_caliberkey4,cbg_caliberkeyname4,cbg_caliberkey5,cbg_caliberkeyname5,cbg_caliberkey6,cbg_caliberkeyname6,cbg_calibercode4,cbg_calibername4,cbg_calibercode5,cbg_calibername5,cbg_calibercode6,cbg_calibername6,ibg_ctrl,cbg_auditopinion,fexquantity,fexnum,ivouchrowno,csrpolicy,cxjspdids,irequiretrackstyle,ipresentb,cinvccode,binvtype,bservice,cbmemo,cbsysbarcode,cplanmethod,planlotnumber,bgift,cfactorycode,cfactoryname,gcsourceid,gcsourceids,gcupcardnum,gcupid,gcupids,yyc_invname,iOrderAmt_f,iOrderAmt,iNROrderAmt_f,iNROrderAmt,csyssourceautoid)");
            strSql.Append(" values (");
            strSql.Append("@id,@poid,@iappids,@cinvcode,@cinvname,@cinvstd,@cinvaddcode,@iquotedprice,@iquantity,@inum,@iunitprice,@imoney,@itax,@isum,@idiscount,@inatunitprice,@inatmoney,@inattax,@inatsum,@inatdiscount,@darrivedate,@cfree2,@cfree1,@cunitid,@cinvm_unit,@igrouptype,@cgroupcode,@cinva_unit,@iinvexchrate,@cinvdefine1,@cinvdefine2,@cinvdefine3,@cinvdefine4,@cinvdefine5,@cinvdefine6,@cinvdefine7,@cinvdefine8,@cinvdefine9,@cinvdefine10,@ccomunitcode,@cinvdefine11,@cinvdefine12,@cinvdefine13,@cinvdefine14,@cinvdefine15,@cinvdefine16,@cdefine22,@cdefine23,@cdefine24,@cdefine25,@cdefine26,@cdefine27,@cdefine28,@cdefine29,@cdefine30,@cdefine31,@cdefine32,@cdefine33,@cdefine34,@cdefine35,@cdefine36,@cdefine37,@ipertaxrate,@citemcode,@citemname,@citem_class,@citem_name,@ppcids,@contractrowguid,@cfree3,@cfree4,@cfree5,@cfree6,@cfree7,@cfree8,@cfree9,@cfree10,@itaxprice,@isosid,@cinvauthid,@btaxcost,@iarrqty,@iarrnum,@iarrmoney,@inatarrmoney,@ireceivedqty,@ireceivednum,@ireceivedmoney,@iinvqty,@iinvnum,@iinvmoney,@inatinvmoney,@ioritotal,@itotal,@bgsp,@csource,@csocode,@contractcode,@contractrowno,@irowno,@sotype,@sodid,@iinvmpcost,@cbcloser,@ippartid,@ipquantity,@iptoseq,@cveninvcode,@cveninvname,@cupsocode,@upsotype,@iordertype,@csoordercode,@iorderseq,@iorderdid,@cdemandmemo,@cbclosetime,@cbclosedate,@cbg_itemcode,@cbg_itemname,@cbg_caliberkey1,@cbg_caliberkeyname1,@cbg_caliberkey2,@cbg_caliberkeyname2,@cbg_caliberkey3,@cbg_caliberkeyname3,@cbg_calibercode1,@cbg_calibername1,@cbg_calibercode2,@cbg_calibername2,@cbg_calibercode3,@cbg_calibername3,@cbg_caliberkey4,@cbg_caliberkeyname4,@cbg_caliberkey5,@cbg_caliberkeyname5,@cbg_caliberkey6,@cbg_caliberkeyname6,@cbg_calibercode4,@cbg_calibername4,@cbg_calibercode5,@cbg_calibername5,@cbg_calibercode6,@cbg_calibername6,@ibg_ctrl,@cbg_auditopinion,@fexquantity,@fexnum,@ivouchrowno,@csrpolicy,@cxjspdids,@irequiretrackstyle,@ipresentb,@cinvccode,@binvtype,@bservice,@cbmemo,@cbsysbarcode,@cplanmethod,@planlotnumber,@bgift,@cfactorycode,@cfactoryname,@gcsourceid,@gcsourceids,@gcupcardnum,@gcupid,@gcupids,@yyc_invname,@iOrderAmt_f,@iOrderAmt,@iNROrderAmt_f,@iNROrderAmt,@csyssourceautoid)");
            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@poid", SqlDbType.Int,4),
                    new SqlParameter("@iappids", SqlDbType.Int,4),
                    new SqlParameter("@cinvcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvname", SqlDbType.NVarChar,255),
                    new SqlParameter("@cinvstd", SqlDbType.NVarChar,255),
                    new SqlParameter("@cinvaddcode", SqlDbType.NVarChar,255),
                    new SqlParameter("@iquotedprice", SqlDbType.Decimal,17),
                    new SqlParameter("@iquantity", SqlDbType.Decimal,17),
                    new SqlParameter("@inum", SqlDbType.Decimal,17),
                    new SqlParameter("@iunitprice", SqlDbType.Decimal,17),
                    new SqlParameter("@imoney", SqlDbType.Money,8),
                    new SqlParameter("@itax", SqlDbType.Money,8),
                    new SqlParameter("@isum", SqlDbType.Money,8),
                    new SqlParameter("@idiscount", SqlDbType.Money,8),
                    new SqlParameter("@inatunitprice", SqlDbType.Decimal,17),
                    new SqlParameter("@inatmoney", SqlDbType.Money,8),
                    new SqlParameter("@inattax", SqlDbType.Money,8),
                    new SqlParameter("@inatsum", SqlDbType.Money,8),
                    new SqlParameter("@inatdiscount", SqlDbType.Money,8),
                    new SqlParameter("@darrivedate", SqlDbType.DateTime),
                    new SqlParameter("@cfree2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cunitid", SqlDbType.NVarChar,35),
                    new SqlParameter("@cinvm_unit", SqlDbType.NVarChar,20),
                    new SqlParameter("@igrouptype", SqlDbType.TinyInt,1),
                    new SqlParameter("@cgroupcode", SqlDbType.NVarChar,35),
                    new SqlParameter("@cinva_unit", SqlDbType.NVarChar,20),
                    new SqlParameter("@iinvexchrate", SqlDbType.Decimal,17),
                    new SqlParameter("@cinvdefine1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine4", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine5", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine6", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine7", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine8", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine9", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine10", SqlDbType.NVarChar,120),
                    new SqlParameter("@ccomunitcode", SqlDbType.NVarChar,35),
                    new SqlParameter("@cinvdefine11", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine12", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine13", SqlDbType.Float,8),
                    new SqlParameter("@cinvdefine14", SqlDbType.Float,8),
                    new SqlParameter("@cinvdefine15", SqlDbType.DateTime),
                    new SqlParameter("@cinvdefine16", SqlDbType.DateTime),
                    new SqlParameter("@cdefine22", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine23", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine24", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine25", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine26", SqlDbType.Float,8),
                    new SqlParameter("@cdefine27", SqlDbType.Float,8),
                    new SqlParameter("@cdefine28", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine29", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine30", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine31", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine32", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine33", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine34", SqlDbType.Int,4),
                    new SqlParameter("@cdefine35", SqlDbType.Int,4),
                    new SqlParameter("@cdefine36", SqlDbType.DateTime),
                    new SqlParameter("@cdefine37", SqlDbType.DateTime),
                    new SqlParameter("@ipertaxrate", SqlDbType.Decimal,13),
                    new SqlParameter("@citemcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@citemname", SqlDbType.NVarChar,255),
                    new SqlParameter("@citem_class", SqlDbType.NVarChar,10),
                    new SqlParameter("@citem_name", SqlDbType.NVarChar,50),
                    new SqlParameter("@ppcids", SqlDbType.Int,4),
                    new SqlParameter("@contractrowguid", SqlDbType.UniqueIdentifier,16),
                    new SqlParameter("@cfree3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree4", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree5", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree6", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree7", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree8", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree9", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree10", SqlDbType.NVarChar,20),
                    new SqlParameter("@itaxprice", SqlDbType.Decimal,13),
                    new SqlParameter("@isosid", SqlDbType.Int,4),
                    new SqlParameter("@cinvauthid", SqlDbType.Int,4),
                    new SqlParameter("@btaxcost", SqlDbType.Bit,1),
                    new SqlParameter("@iarrqty", SqlDbType.Decimal,13),
                    new SqlParameter("@iarrnum", SqlDbType.Decimal,13),
                    new SqlParameter("@iarrmoney", SqlDbType.Money,8),
                    new SqlParameter("@inatarrmoney", SqlDbType.Money,8),
                    new SqlParameter("@ireceivedqty", SqlDbType.Decimal,17),
                    new SqlParameter("@ireceivednum", SqlDbType.Decimal,17),
                    new SqlParameter("@ireceivedmoney", SqlDbType.Money,8),
                    new SqlParameter("@iinvqty", SqlDbType.Decimal,17),
                    new SqlParameter("@iinvnum", SqlDbType.Decimal,17),
                    new SqlParameter("@iinvmoney", SqlDbType.Money,8),
                    new SqlParameter("@inatinvmoney", SqlDbType.Money,8),
                    new SqlParameter("@ioritotal", SqlDbType.Money,8),
                    new SqlParameter("@itotal", SqlDbType.Money,8),
                    new SqlParameter("@bgsp", SqlDbType.TinyInt,1),
                    new SqlParameter("@csource", SqlDbType.NVarChar,10),
                    new SqlParameter("@csocode", SqlDbType.NVarChar,40),
                    new SqlParameter("@contractcode", SqlDbType.NVarChar,128),
                    new SqlParameter("@contractrowno", SqlDbType.NVarChar,150),
                    new SqlParameter("@irowno", SqlDbType.Int,4),
                    new SqlParameter("@sotype", SqlDbType.TinyInt,1),
                    new SqlParameter("@sodid", SqlDbType.NVarChar,50),
                    new SqlParameter("@iinvmpcost", SqlDbType.Decimal,13),
                    new SqlParameter("@cbcloser", SqlDbType.NVarChar,20),
                    new SqlParameter("@ippartid", SqlDbType.Int,4),
                    new SqlParameter("@ipquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@iptoseq", SqlDbType.Int,4),
                    new SqlParameter("@cveninvcode", SqlDbType.NVarChar,40),
                    new SqlParameter("@cveninvname", SqlDbType.NVarChar,100),
                    new SqlParameter("@cupsocode", SqlDbType.NVarChar,64),
                    new SqlParameter("@upsotype", SqlDbType.NVarChar,10),
                    new SqlParameter("@iordertype", SqlDbType.TinyInt,1),
                    new SqlParameter("@csoordercode", SqlDbType.NVarChar,50),
                    new SqlParameter("@iorderseq", SqlDbType.Int,4),
                    new SqlParameter("@iorderdid", SqlDbType.Int,4),
                    new SqlParameter("@cdemandmemo", SqlDbType.NVarChar,255),
                    new SqlParameter("@cbclosetime", SqlDbType.DateTime),
                    new SqlParameter("@cbclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cbg_itemcode", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_itemname", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey1", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname1", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey2", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname2", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey3", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname3", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode1", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername1", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode2", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername2", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode3", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername3", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey4", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname4", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey5", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname5", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey6", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname6", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode4", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername4", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode5", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername5", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode6", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername6", SqlDbType.NVarChar,100),
                    new SqlParameter("@ibg_ctrl", SqlDbType.TinyInt,1),
                    new SqlParameter("@cbg_auditopinion", SqlDbType.NVarChar,100),
                    new SqlParameter("@fexquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@fexnum", SqlDbType.Decimal,13),
                    new SqlParameter("@ivouchrowno", SqlDbType.Int,4),
                    new SqlParameter("@csrpolicy", SqlDbType.NVarChar,2),
                    new SqlParameter("@cxjspdids", SqlDbType.NVarChar,60),
                    new SqlParameter("@irequiretrackstyle", SqlDbType.Int,4),
                    new SqlParameter("@ipresentb", SqlDbType.Int,4),
                    new SqlParameter("@cinvccode", SqlDbType.NVarChar,12),
                    new SqlParameter("@binvtype", SqlDbType.Bit,1),
                    new SqlParameter("@bservice", SqlDbType.Bit,1),
                    new SqlParameter("@cbmemo", SqlDbType.NVarChar,255),
                    new SqlParameter("@cbsysbarcode", SqlDbType.NVarChar,80),
                    new SqlParameter("@cplanmethod", SqlDbType.NVarChar,1),
                    new SqlParameter("@planlotnumber", SqlDbType.NVarChar,40),
                    new SqlParameter("@bgift", SqlDbType.SmallInt,2),
                    new SqlParameter("@cfactorycode", SqlDbType.NVarChar,50),
                    new SqlParameter("@cfactoryname", SqlDbType.NVarChar,255),
                    new SqlParameter("@gcsourceid", SqlDbType.Int,4),
                    new SqlParameter("@gcsourceids", SqlDbType.Int,4),
                    new SqlParameter("@gcupcardnum", SqlDbType.NVarChar,100),
                    new SqlParameter("@gcupid", SqlDbType.Int,4),
                    new SqlParameter("@gcupids", SqlDbType.Int,4),
                    new SqlParameter("@yyc_invname", SqlDbType.NVarChar,255),
                    new SqlParameter("@iOrderAmt_f", SqlDbType.Money,8),
                    new SqlParameter("@iOrderAmt", SqlDbType.Money,8),
                    new SqlParameter("@iNROrderAmt_f", SqlDbType.Money,8),
                    new SqlParameter("@iNROrderAmt", SqlDbType.Money,8),
                    new SqlParameter("@csyssourceautoid", SqlDbType.NVarChar,50)};
            parameters[0].Value = id;
            parameters[1].Value = poid;
            parameters[2].Value = iappids;
            parameters[3].Value = cinvcode;
            parameters[4].Value = cinvname;
            parameters[5].Value = cinvstd;
            parameters[6].Value = cinvaddcode;
            parameters[7].Value = iquotedprice;
            parameters[8].Value = iquantity;
            parameters[9].Value = inum;
            parameters[10].Value = iunitprice;
            parameters[11].Value = imoney;
            parameters[12].Value = itax;
            parameters[13].Value = isum;
            parameters[14].Value = idiscount;
            parameters[15].Value = inatunitprice;
            parameters[16].Value = inatmoney;
            parameters[17].Value = inattax;
            parameters[18].Value = inatsum;
            parameters[19].Value = inatdiscount;
            parameters[20].Value = darrivedate;
            parameters[21].Value = cfree2;
            parameters[22].Value = cfree1;
            parameters[23].Value = cunitid;
            parameters[24].Value = cinvm_unit;
            parameters[25].Value = igrouptype;
            parameters[26].Value = cgroupcode;
            parameters[27].Value = cinva_unit;
            parameters[28].Value = iinvexchrate;
            parameters[29].Value = cinvdefine1;
            parameters[30].Value = cinvdefine2;
            parameters[31].Value = cinvdefine3;
            parameters[32].Value = cinvdefine4;
            parameters[33].Value = cinvdefine5;
            parameters[34].Value = cinvdefine6;
            parameters[35].Value = cinvdefine7;
            parameters[36].Value = cinvdefine8;
            parameters[37].Value = cinvdefine9;
            parameters[38].Value = cinvdefine10;
            parameters[39].Value = ccomunitcode;
            parameters[40].Value = cinvdefine11;
            parameters[41].Value = cinvdefine12;
            parameters[42].Value = cinvdefine13;
            parameters[43].Value = cinvdefine14;
            parameters[44].Value = cinvdefine15;
            parameters[45].Value = cinvdefine16;
            parameters[46].Value = cdefine22;
            parameters[47].Value = cdefine23;
            parameters[48].Value = cdefine24;
            parameters[49].Value = cdefine25;
            parameters[50].Value = cdefine26;
            parameters[51].Value = cdefine27;
            parameters[52].Value = cdefine28;
            parameters[53].Value = cdefine29;
            parameters[54].Value = cdefine30;
            parameters[55].Value = cdefine31;
            parameters[56].Value = cdefine32;
            parameters[57].Value = cdefine33;
            parameters[58].Value = cdefine34;
            parameters[59].Value = cdefine35;
            parameters[60].Value = cdefine36;
            parameters[61].Value = cdefine37;
            parameters[62].Value = ipertaxrate;
            parameters[63].Value = citemcode;
            parameters[64].Value = citemname;
            parameters[65].Value = citem_class;
            parameters[66].Value = citem_name;
            parameters[67].Value = ppcids;
            parameters[68].Value = contractrowguid;
            parameters[69].Value = cfree3;
            parameters[70].Value = cfree4;
            parameters[71].Value = cfree5;
            parameters[72].Value = cfree6;
            parameters[73].Value = cfree7;
            parameters[74].Value = cfree8;
            parameters[75].Value = cfree9;
            parameters[76].Value = cfree10;
            parameters[77].Value = itaxprice;
            parameters[78].Value = isosid;
            parameters[79].Value = cinvauthid;
            parameters[80].Value = btaxcost;
            parameters[81].Value = iarrqty;
            parameters[82].Value = iarrnum;
            parameters[83].Value = iarrmoney;
            parameters[84].Value = inatarrmoney;
            parameters[85].Value = ireceivedqty;
            parameters[86].Value = ireceivednum;
            parameters[87].Value = ireceivedmoney;
            parameters[88].Value = iinvqty;
            parameters[89].Value = iinvnum;
            parameters[90].Value = iinvmoney;
            parameters[91].Value = inatinvmoney;
            parameters[92].Value = ioritotal;
            parameters[93].Value = itotal;
            parameters[94].Value = bgsp;
            parameters[95].Value = csource;
            parameters[96].Value = csocode;
            parameters[97].Value = contractcode;
            parameters[98].Value = contractrowno;
            parameters[99].Value = irowno;
            parameters[100].Value = sotype;
            parameters[101].Value = sodid;
            parameters[102].Value = iinvmpcost;
            parameters[103].Value = cbcloser;
            parameters[104].Value = ippartid;
            parameters[105].Value = ipquantity;
            parameters[106].Value = iptoseq;
            parameters[107].Value = cveninvcode;
            parameters[108].Value = cveninvname;
            parameters[109].Value = cupsocode;
            parameters[110].Value = upsotype;
            parameters[111].Value = iordertype;
            parameters[112].Value = csoordercode;
            parameters[113].Value = iorderseq;
            parameters[114].Value = iorderdid;
            parameters[115].Value = cdemandmemo;
            parameters[116].Value = cbclosetime;
            parameters[117].Value = cbclosedate;
            parameters[118].Value = cbg_itemcode;
            parameters[119].Value = cbg_itemname;
            parameters[120].Value = cbg_caliberkey1;
            parameters[121].Value = cbg_caliberkeyname1;
            parameters[122].Value = cbg_caliberkey2;
            parameters[123].Value = cbg_caliberkeyname2;
            parameters[124].Value = cbg_caliberkey3;
            parameters[125].Value = cbg_caliberkeyname3;
            parameters[126].Value = cbg_calibercode1;
            parameters[127].Value = cbg_calibername1;
            parameters[128].Value = cbg_calibercode2;
            parameters[129].Value = cbg_calibername2;
            parameters[130].Value = cbg_calibercode3;
            parameters[131].Value = cbg_calibername3;
            parameters[132].Value = cbg_caliberkey4;
            parameters[133].Value = cbg_caliberkeyname4;
            parameters[134].Value = cbg_caliberkey5;
            parameters[135].Value = cbg_caliberkeyname5;
            parameters[136].Value = cbg_caliberkey6;
            parameters[137].Value = cbg_caliberkeyname6;
            parameters[138].Value = cbg_calibercode4;
            parameters[139].Value = cbg_calibername4;
            parameters[140].Value = cbg_calibercode5;
            parameters[141].Value = cbg_calibername5;
            parameters[142].Value = cbg_calibercode6;
            parameters[143].Value = cbg_calibername6;
            parameters[144].Value = ibg_ctrl;
            parameters[145].Value = cbg_auditopinion;
            parameters[146].Value = fexquantity;
            parameters[147].Value = fexnum;
            parameters[148].Value = ivouchrowno;
            parameters[149].Value = csrpolicy;
            parameters[150].Value = cxjspdids;
            parameters[151].Value = irequiretrackstyle;
            parameters[152].Value = ipresentb;
            parameters[153].Value = cinvccode;
            parameters[154].Value = binvtype;
            parameters[155].Value = bservice;
            parameters[156].Value = cbmemo;
            parameters[157].Value = cbsysbarcode;
            parameters[158].Value = cplanmethod;
            parameters[159].Value = planlotnumber;
            parameters[160].Value = bgift;
            parameters[161].Value = cfactorycode;
            parameters[162].Value = cfactoryname;
            parameters[163].Value = gcsourceid;
            parameters[164].Value = gcsourceids;
            parameters[165].Value = gcupcardnum;
            parameters[166].Value = gcupid;
            parameters[167].Value = gcupids;
            parameters[168].Value = yyc_invname;
            parameters[169].Value = iOrderAmt_f;
            parameters[170].Value = iOrderAmt;
            parameters[171].Value = iNROrderAmt_f;
            parameters[172].Value = iNROrderAmt;
            parameters[173].Value = csyssourceautoid;

            DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update [zpurpotail] set ");
            strSql.Append("id=@id,");
            strSql.Append("poid=@poid,");
            strSql.Append("iappids=@iappids,");
            strSql.Append("cinvcode=@cinvcode,");
            strSql.Append("cinvname=@cinvname,");
            strSql.Append("cinvstd=@cinvstd,");
            strSql.Append("cinvaddcode=@cinvaddcode,");
            strSql.Append("iquotedprice=@iquotedprice,");
            strSql.Append("iquantity=@iquantity,");
            strSql.Append("inum=@inum,");
            strSql.Append("iunitprice=@iunitprice,");
            strSql.Append("imoney=@imoney,");
            strSql.Append("itax=@itax,");
            strSql.Append("isum=@isum,");
            strSql.Append("idiscount=@idiscount,");
            strSql.Append("inatunitprice=@inatunitprice,");
            strSql.Append("inatmoney=@inatmoney,");
            strSql.Append("inattax=@inattax,");
            strSql.Append("inatsum=@inatsum,");
            strSql.Append("inatdiscount=@inatdiscount,");
            strSql.Append("darrivedate=@darrivedate,");
            strSql.Append("cfree2=@cfree2,");
            strSql.Append("cfree1=@cfree1,");
            strSql.Append("cunitid=@cunitid,");
            strSql.Append("cinvm_unit=@cinvm_unit,");
            strSql.Append("igrouptype=@igrouptype,");
            strSql.Append("cgroupcode=@cgroupcode,");
            strSql.Append("cinva_unit=@cinva_unit,");
            strSql.Append("iinvexchrate=@iinvexchrate,");
            strSql.Append("cinvdefine1=@cinvdefine1,");
            strSql.Append("cinvdefine2=@cinvdefine2,");
            strSql.Append("cinvdefine3=@cinvdefine3,");
            strSql.Append("cinvdefine4=@cinvdefine4,");
            strSql.Append("cinvdefine5=@cinvdefine5,");
            strSql.Append("cinvdefine6=@cinvdefine6,");
            strSql.Append("cinvdefine7=@cinvdefine7,");
            strSql.Append("cinvdefine8=@cinvdefine8,");
            strSql.Append("cinvdefine9=@cinvdefine9,");
            strSql.Append("cinvdefine10=@cinvdefine10,");
            strSql.Append("ccomunitcode=@ccomunitcode,");
            strSql.Append("cinvdefine11=@cinvdefine11,");
            strSql.Append("cinvdefine12=@cinvdefine12,");
            strSql.Append("cinvdefine13=@cinvdefine13,");
            strSql.Append("cinvdefine14=@cinvdefine14,");
            strSql.Append("cinvdefine15=@cinvdefine15,");
            strSql.Append("cinvdefine16=@cinvdefine16,");
            strSql.Append("cdefine22=@cdefine22,");
            strSql.Append("cdefine23=@cdefine23,");
            strSql.Append("cdefine24=@cdefine24,");
            strSql.Append("cdefine25=@cdefine25,");
            strSql.Append("cdefine26=@cdefine26,");
            strSql.Append("cdefine27=@cdefine27,");
            strSql.Append("cdefine28=@cdefine28,");
            strSql.Append("cdefine29=@cdefine29,");
            strSql.Append("cdefine30=@cdefine30,");
            strSql.Append("cdefine31=@cdefine31,");
            strSql.Append("cdefine32=@cdefine32,");
            strSql.Append("cdefine33=@cdefine33,");
            strSql.Append("cdefine34=@cdefine34,");
            strSql.Append("cdefine35=@cdefine35,");
            strSql.Append("cdefine36=@cdefine36,");
            strSql.Append("cdefine37=@cdefine37,");
            strSql.Append("ipertaxrate=@ipertaxrate,");
            strSql.Append("citemcode=@citemcode,");
            strSql.Append("citemname=@citemname,");
            strSql.Append("citem_class=@citem_class,");
            strSql.Append("citem_name=@citem_name,");
            strSql.Append("ppcids=@ppcids,");
            strSql.Append("contractrowguid=@contractrowguid,");
            strSql.Append("cfree3=@cfree3,");
            strSql.Append("cfree4=@cfree4,");
            strSql.Append("cfree5=@cfree5,");
            strSql.Append("cfree6=@cfree6,");
            strSql.Append("cfree7=@cfree7,");
            strSql.Append("cfree8=@cfree8,");
            strSql.Append("cfree9=@cfree9,");
            strSql.Append("cfree10=@cfree10,");
            strSql.Append("itaxprice=@itaxprice,");
            strSql.Append("isosid=@isosid,");
            strSql.Append("cinvauthid=@cinvauthid,");
            strSql.Append("btaxcost=@btaxcost,");
            strSql.Append("iarrqty=@iarrqty,");
            strSql.Append("iarrnum=@iarrnum,");
            strSql.Append("iarrmoney=@iarrmoney,");
            strSql.Append("inatarrmoney=@inatarrmoney,");
            strSql.Append("ireceivedqty=@ireceivedqty,");
            strSql.Append("ireceivednum=@ireceivednum,");
            strSql.Append("ireceivedmoney=@ireceivedmoney,");
            strSql.Append("iinvqty=@iinvqty,");
            strSql.Append("iinvnum=@iinvnum,");
            strSql.Append("iinvmoney=@iinvmoney,");
            strSql.Append("inatinvmoney=@inatinvmoney,");
            strSql.Append("ioritotal=@ioritotal,");
            strSql.Append("itotal=@itotal,");
            strSql.Append("bgsp=@bgsp,");
            strSql.Append("csource=@csource,");
            strSql.Append("csocode=@csocode,");
            strSql.Append("contractcode=@contractcode,");
            strSql.Append("contractrowno=@contractrowno,");
            strSql.Append("irowno=@irowno,");
            strSql.Append("sotype=@sotype,");
            strSql.Append("sodid=@sodid,");
            strSql.Append("iinvmpcost=@iinvmpcost,");
            strSql.Append("cbcloser=@cbcloser,");
            strSql.Append("ippartid=@ippartid,");
            strSql.Append("ipquantity=@ipquantity,");
            strSql.Append("iptoseq=@iptoseq,");
            strSql.Append("cveninvcode=@cveninvcode,");
            strSql.Append("cveninvname=@cveninvname,");
            strSql.Append("cupsocode=@cupsocode,");
            strSql.Append("upsotype=@upsotype,");
            strSql.Append("iordertype=@iordertype,");
            strSql.Append("csoordercode=@csoordercode,");
            strSql.Append("iorderseq=@iorderseq,");
            strSql.Append("iorderdid=@iorderdid,");
            strSql.Append("cdemandmemo=@cdemandmemo,");
            strSql.Append("cbclosetime=@cbclosetime,");
            strSql.Append("cbclosedate=@cbclosedate,");
            strSql.Append("cbg_itemcode=@cbg_itemcode,");
            strSql.Append("cbg_itemname=@cbg_itemname,");
            strSql.Append("cbg_caliberkey1=@cbg_caliberkey1,");
            strSql.Append("cbg_caliberkeyname1=@cbg_caliberkeyname1,");
            strSql.Append("cbg_caliberkey2=@cbg_caliberkey2,");
            strSql.Append("cbg_caliberkeyname2=@cbg_caliberkeyname2,");
            strSql.Append("cbg_caliberkey3=@cbg_caliberkey3,");
            strSql.Append("cbg_caliberkeyname3=@cbg_caliberkeyname3,");
            strSql.Append("cbg_calibercode1=@cbg_calibercode1,");
            strSql.Append("cbg_calibername1=@cbg_calibername1,");
            strSql.Append("cbg_calibercode2=@cbg_calibercode2,");
            strSql.Append("cbg_calibername2=@cbg_calibername2,");
            strSql.Append("cbg_calibercode3=@cbg_calibercode3,");
            strSql.Append("cbg_calibername3=@cbg_calibername3,");
            strSql.Append("cbg_caliberkey4=@cbg_caliberkey4,");
            strSql.Append("cbg_caliberkeyname4=@cbg_caliberkeyname4,");
            strSql.Append("cbg_caliberkey5=@cbg_caliberkey5,");
            strSql.Append("cbg_caliberkeyname5=@cbg_caliberkeyname5,");
            strSql.Append("cbg_caliberkey6=@cbg_caliberkey6,");
            strSql.Append("cbg_caliberkeyname6=@cbg_caliberkeyname6,");
            strSql.Append("cbg_calibercode4=@cbg_calibercode4,");
            strSql.Append("cbg_calibername4=@cbg_calibername4,");
            strSql.Append("cbg_calibercode5=@cbg_calibercode5,");
            strSql.Append("cbg_calibername5=@cbg_calibername5,");
            strSql.Append("cbg_calibercode6=@cbg_calibercode6,");
            strSql.Append("cbg_calibername6=@cbg_calibername6,");
            strSql.Append("ibg_ctrl=@ibg_ctrl,");
            strSql.Append("cbg_auditopinion=@cbg_auditopinion,");
            strSql.Append("fexquantity=@fexquantity,");
            strSql.Append("fexnum=@fexnum,");
            strSql.Append("ivouchrowno=@ivouchrowno,");
            strSql.Append("csrpolicy=@csrpolicy,");
            strSql.Append("cxjspdids=@cxjspdids,");
            strSql.Append("irequiretrackstyle=@irequiretrackstyle,");
            strSql.Append("ipresentb=@ipresentb,");
            strSql.Append("cinvccode=@cinvccode,");
            strSql.Append("binvtype=@binvtype,");
            strSql.Append("bservice=@bservice,");
            strSql.Append("cbmemo=@cbmemo,");
            strSql.Append("cbsysbarcode=@cbsysbarcode,");
            strSql.Append("cplanmethod=@cplanmethod,");
            strSql.Append("planlotnumber=@planlotnumber,");
            strSql.Append("bgift=@bgift,");
            strSql.Append("cfactorycode=@cfactorycode,");
            strSql.Append("cfactoryname=@cfactoryname,");
            strSql.Append("gcsourceid=@gcsourceid,");
            strSql.Append("gcsourceids=@gcsourceids,");
            strSql.Append("gcupcardnum=@gcupcardnum,");
            strSql.Append("gcupid=@gcupid,");
            strSql.Append("gcupids=@gcupids,");
            strSql.Append("yyc_invname=@yyc_invname,");
            strSql.Append("iOrderAmt_f=@iOrderAmt_f,");
            strSql.Append("iOrderAmt=@iOrderAmt,");
            strSql.Append("iNROrderAmt_f=@iNROrderAmt_f,");
            strSql.Append("iNROrderAmt=@iNROrderAmt,");
            strSql.Append("csyssourceautoid=@csyssourceautoid");
            strSql.Append(" where id=@id and poid=@poid and iappids=@iappids and cinvcode=@cinvcode and cinvname=@cinvname and cinvstd=@cinvstd and cinvaddcode=@cinvaddcode and iquotedprice=@iquotedprice and iquantity=@iquantity and inum=@inum and iunitprice=@iunitprice and imoney=@imoney and itax=@itax and isum=@isum and idiscount=@idiscount and inatunitprice=@inatunitprice and inatmoney=@inatmoney and inattax=@inattax and inatsum=@inatsum and inatdiscount=@inatdiscount and darrivedate=@darrivedate and cfree2=@cfree2 and cfree1=@cfree1 and cunitid=@cunitid and cinvm_unit=@cinvm_unit and igrouptype=@igrouptype and cgroupcode=@cgroupcode and cinva_unit=@cinva_unit and iinvexchrate=@iinvexchrate and cinvdefine1=@cinvdefine1 and cinvdefine2=@cinvdefine2 and cinvdefine3=@cinvdefine3 and cinvdefine4=@cinvdefine4 and cinvdefine5=@cinvdefine5 and cinvdefine6=@cinvdefine6 and cinvdefine7=@cinvdefine7 and cinvdefine8=@cinvdefine8 and cinvdefine9=@cinvdefine9 and cinvdefine10=@cinvdefine10 and ccomunitcode=@ccomunitcode and cinvdefine11=@cinvdefine11 and cinvdefine12=@cinvdefine12 and cinvdefine13=@cinvdefine13 and cinvdefine14=@cinvdefine14 and cinvdefine15=@cinvdefine15 and cinvdefine16=@cinvdefine16 and cdefine22=@cdefine22 and cdefine23=@cdefine23 and cdefine24=@cdefine24 and cdefine25=@cdefine25 and cdefine26=@cdefine26 and cdefine27=@cdefine27 and cdefine28=@cdefine28 and cdefine29=@cdefine29 and cdefine30=@cdefine30 and cdefine31=@cdefine31 and cdefine32=@cdefine32 and cdefine33=@cdefine33 and cdefine34=@cdefine34 and cdefine35=@cdefine35 and cdefine36=@cdefine36 and cdefine37=@cdefine37 and ipertaxrate=@ipertaxrate and citemcode=@citemcode and citemname=@citemname and citem_class=@citem_class and citem_name=@citem_name and ppcids=@ppcids and contractrowguid=@contractrowguid and cfree3=@cfree3 and cfree4=@cfree4 and cfree5=@cfree5 and cfree6=@cfree6 and cfree7=@cfree7 and cfree8=@cfree8 and cfree9=@cfree9 and cfree10=@cfree10 and itaxprice=@itaxprice and isosid=@isosid and cinvauthid=@cinvauthid and btaxcost=@btaxcost and iarrqty=@iarrqty and iarrnum=@iarrnum and iarrmoney=@iarrmoney and inatarrmoney=@inatarrmoney and ireceivedqty=@ireceivedqty and ireceivednum=@ireceivednum and ireceivedmoney=@ireceivedmoney and iinvqty=@iinvqty and iinvnum=@iinvnum and iinvmoney=@iinvmoney and inatinvmoney=@inatinvmoney and ioritotal=@ioritotal and itotal=@itotal and bgsp=@bgsp and csource=@csource and csocode=@csocode and contractcode=@contractcode and contractrowno=@contractrowno and irowno=@irowno and sotype=@sotype and sodid=@sodid and iinvmpcost=@iinvmpcost and cbcloser=@cbcloser and ippartid=@ippartid and ipquantity=@ipquantity and iptoseq=@iptoseq and cveninvcode=@cveninvcode and cveninvname=@cveninvname and cupsocode=@cupsocode and upsotype=@upsotype and iordertype=@iordertype and csoordercode=@csoordercode and iorderseq=@iorderseq and iorderdid=@iorderdid and cdemandmemo=@cdemandmemo and cbclosetime=@cbclosetime and cbclosedate=@cbclosedate and cbg_itemcode=@cbg_itemcode and cbg_itemname=@cbg_itemname and cbg_caliberkey1=@cbg_caliberkey1 and cbg_caliberkeyname1=@cbg_caliberkeyname1 and cbg_caliberkey2=@cbg_caliberkey2 and cbg_caliberkeyname2=@cbg_caliberkeyname2 and cbg_caliberkey3=@cbg_caliberkey3 and cbg_caliberkeyname3=@cbg_caliberkeyname3 and cbg_calibercode1=@cbg_calibercode1 and cbg_calibername1=@cbg_calibername1 and cbg_calibercode2=@cbg_calibercode2 and cbg_calibername2=@cbg_calibername2 and cbg_calibercode3=@cbg_calibercode3 and cbg_calibername3=@cbg_calibername3 and cbg_caliberkey4=@cbg_caliberkey4 and cbg_caliberkeyname4=@cbg_caliberkeyname4 and cbg_caliberkey5=@cbg_caliberkey5 and cbg_caliberkeyname5=@cbg_caliberkeyname5 and cbg_caliberkey6=@cbg_caliberkey6 and cbg_caliberkeyname6=@cbg_caliberkeyname6 and cbg_calibercode4=@cbg_calibercode4 and cbg_calibername4=@cbg_calibername4 and cbg_calibercode5=@cbg_calibercode5 and cbg_calibername5=@cbg_calibername5 and cbg_calibercode6=@cbg_calibercode6 and cbg_calibername6=@cbg_calibername6 and ibg_ctrl=@ibg_ctrl and cbg_auditopinion=@cbg_auditopinion and fexquantity=@fexquantity and fexnum=@fexnum and ivouchrowno=@ivouchrowno and csrpolicy=@csrpolicy and cxjspdids=@cxjspdids and irequiretrackstyle=@irequiretrackstyle and ipresentb=@ipresentb and cinvccode=@cinvccode and binvtype=@binvtype and bservice=@bservice and cbmemo=@cbmemo and cbsysbarcode=@cbsysbarcode and cplanmethod=@cplanmethod and planlotnumber=@planlotnumber and bgift=@bgift and cfactorycode=@cfactorycode and cfactoryname=@cfactoryname and gcsourceid=@gcsourceid and gcsourceids=@gcsourceids and gcupcardnum=@gcupcardnum and gcupid=@gcupid and gcupids=@gcupids and yyc_invname=@yyc_invname and iOrderAmt_f=@iOrderAmt_f and iOrderAmt=@iOrderAmt and iNROrderAmt_f=@iNROrderAmt_f and iNROrderAmt=@iNROrderAmt and csyssourceautoid=@csyssourceautoid ");
            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@poid", SqlDbType.Int,4),
                    new SqlParameter("@iappids", SqlDbType.Int,4),
                    new SqlParameter("@cinvcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvname", SqlDbType.NVarChar,255),
                    new SqlParameter("@cinvstd", SqlDbType.NVarChar,255),
                    new SqlParameter("@cinvaddcode", SqlDbType.NVarChar,255),
                    new SqlParameter("@iquotedprice", SqlDbType.Decimal,17),
                    new SqlParameter("@iquantity", SqlDbType.Decimal,17),
                    new SqlParameter("@inum", SqlDbType.Decimal,17),
                    new SqlParameter("@iunitprice", SqlDbType.Decimal,17),
                    new SqlParameter("@imoney", SqlDbType.Money,8),
                    new SqlParameter("@itax", SqlDbType.Money,8),
                    new SqlParameter("@isum", SqlDbType.Money,8),
                    new SqlParameter("@idiscount", SqlDbType.Money,8),
                    new SqlParameter("@inatunitprice", SqlDbType.Decimal,17),
                    new SqlParameter("@inatmoney", SqlDbType.Money,8),
                    new SqlParameter("@inattax", SqlDbType.Money,8),
                    new SqlParameter("@inatsum", SqlDbType.Money,8),
                    new SqlParameter("@inatdiscount", SqlDbType.Money,8),
                    new SqlParameter("@darrivedate", SqlDbType.DateTime),
                    new SqlParameter("@cfree2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cunitid", SqlDbType.NVarChar,35),
                    new SqlParameter("@cinvm_unit", SqlDbType.NVarChar,20),
                    new SqlParameter("@igrouptype", SqlDbType.TinyInt,1),
                    new SqlParameter("@cgroupcode", SqlDbType.NVarChar,35),
                    new SqlParameter("@cinva_unit", SqlDbType.NVarChar,20),
                    new SqlParameter("@iinvexchrate", SqlDbType.Decimal,17),
                    new SqlParameter("@cinvdefine1", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine2", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cinvdefine4", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine5", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine6", SqlDbType.NVarChar,60),
                    new SqlParameter("@cinvdefine7", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine8", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine9", SqlDbType.NVarChar,120),
                    new SqlParameter("@cinvdefine10", SqlDbType.NVarChar,120),
                    new SqlParameter("@ccomunitcode", SqlDbType.NVarChar,35),
                    new SqlParameter("@cinvdefine11", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine12", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine13", SqlDbType.Float,8),
                    new SqlParameter("@cinvdefine14", SqlDbType.Float,8),
                    new SqlParameter("@cinvdefine15", SqlDbType.DateTime),
                    new SqlParameter("@cinvdefine16", SqlDbType.DateTime),
                    new SqlParameter("@cdefine22", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine23", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine24", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine25", SqlDbType.NVarChar,60),
                    new SqlParameter("@cdefine26", SqlDbType.Float,8),
                    new SqlParameter("@cdefine27", SqlDbType.Float,8),
                    new SqlParameter("@cdefine28", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine29", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine30", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine31", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine32", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine33", SqlDbType.NVarChar,120),
                    new SqlParameter("@cdefine34", SqlDbType.Int,4),
                    new SqlParameter("@cdefine35", SqlDbType.Int,4),
                    new SqlParameter("@cdefine36", SqlDbType.DateTime),
                    new SqlParameter("@cdefine37", SqlDbType.DateTime),
                    new SqlParameter("@ipertaxrate", SqlDbType.Decimal,13),
                    new SqlParameter("@citemcode", SqlDbType.NVarChar,60),
                    new SqlParameter("@citemname", SqlDbType.NVarChar,255),
                    new SqlParameter("@citem_class", SqlDbType.NVarChar,10),
                    new SqlParameter("@citem_name", SqlDbType.NVarChar,50),
                    new SqlParameter("@ppcids", SqlDbType.Int,4),
                    new SqlParameter("@contractrowguid", SqlDbType.UniqueIdentifier,16),
                    new SqlParameter("@cfree3", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree4", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree5", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree6", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree7", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree8", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree9", SqlDbType.NVarChar,20),
                    new SqlParameter("@cfree10", SqlDbType.NVarChar,20),
                    new SqlParameter("@itaxprice", SqlDbType.Decimal,13),
                    new SqlParameter("@isosid", SqlDbType.Int,4),
                    new SqlParameter("@cinvauthid", SqlDbType.Int,4),
                    new SqlParameter("@btaxcost", SqlDbType.Bit,1),
                    new SqlParameter("@iarrqty", SqlDbType.Decimal,13),
                    new SqlParameter("@iarrnum", SqlDbType.Decimal,13),
                    new SqlParameter("@iarrmoney", SqlDbType.Money,8),
                    new SqlParameter("@inatarrmoney", SqlDbType.Money,8),
                    new SqlParameter("@ireceivedqty", SqlDbType.Decimal,17),
                    new SqlParameter("@ireceivednum", SqlDbType.Decimal,17),
                    new SqlParameter("@ireceivedmoney", SqlDbType.Money,8),
                    new SqlParameter("@iinvqty", SqlDbType.Decimal,17),
                    new SqlParameter("@iinvnum", SqlDbType.Decimal,17),
                    new SqlParameter("@iinvmoney", SqlDbType.Money,8),
                    new SqlParameter("@inatinvmoney", SqlDbType.Money,8),
                    new SqlParameter("@ioritotal", SqlDbType.Money,8),
                    new SqlParameter("@itotal", SqlDbType.Money,8),
                    new SqlParameter("@bgsp", SqlDbType.TinyInt,1),
                    new SqlParameter("@csource", SqlDbType.NVarChar,10),
                    new SqlParameter("@csocode", SqlDbType.NVarChar,40),
                    new SqlParameter("@contractcode", SqlDbType.NVarChar,128),
                    new SqlParameter("@contractrowno", SqlDbType.NVarChar,150),
                    new SqlParameter("@irowno", SqlDbType.Int,4),
                    new SqlParameter("@sotype", SqlDbType.TinyInt,1),
                    new SqlParameter("@sodid", SqlDbType.NVarChar,50),
                    new SqlParameter("@iinvmpcost", SqlDbType.Decimal,13),
                    new SqlParameter("@cbcloser", SqlDbType.NVarChar,20),
                    new SqlParameter("@ippartid", SqlDbType.Int,4),
                    new SqlParameter("@ipquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@iptoseq", SqlDbType.Int,4),
                    new SqlParameter("@cveninvcode", SqlDbType.NVarChar,40),
                    new SqlParameter("@cveninvname", SqlDbType.NVarChar,100),
                    new SqlParameter("@cupsocode", SqlDbType.NVarChar,64),
                    new SqlParameter("@upsotype", SqlDbType.NVarChar,10),
                    new SqlParameter("@iordertype", SqlDbType.TinyInt,1),
                    new SqlParameter("@csoordercode", SqlDbType.NVarChar,50),
                    new SqlParameter("@iorderseq", SqlDbType.Int,4),
                    new SqlParameter("@iorderdid", SqlDbType.Int,4),
                    new SqlParameter("@cdemandmemo", SqlDbType.NVarChar,255),
                    new SqlParameter("@cbclosetime", SqlDbType.DateTime),
                    new SqlParameter("@cbclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cbg_itemcode", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_itemname", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey1", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname1", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey2", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname2", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey3", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname3", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode1", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername1", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode2", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername2", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode3", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername3", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey4", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname4", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey5", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname5", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_caliberkey6", SqlDbType.NVarChar,50),
                    new SqlParameter("@cbg_caliberkeyname6", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode4", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername4", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode5", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername5", SqlDbType.NVarChar,100),
                    new SqlParameter("@cbg_calibercode6", SqlDbType.NVarChar,90),
                    new SqlParameter("@cbg_calibername6", SqlDbType.NVarChar,100),
                    new SqlParameter("@ibg_ctrl", SqlDbType.TinyInt,1),
                    new SqlParameter("@cbg_auditopinion", SqlDbType.NVarChar,100),
                    new SqlParameter("@fexquantity", SqlDbType.Decimal,13),
                    new SqlParameter("@fexnum", SqlDbType.Decimal,13),
                    new SqlParameter("@ivouchrowno", SqlDbType.Int,4),
                    new SqlParameter("@csrpolicy", SqlDbType.NVarChar,2),
                    new SqlParameter("@cxjspdids", SqlDbType.NVarChar,60),
                    new SqlParameter("@irequiretrackstyle", SqlDbType.Int,4),
                    new SqlParameter("@ipresentb", SqlDbType.Int,4),
                    new SqlParameter("@cinvccode", SqlDbType.NVarChar,12),
                    new SqlParameter("@binvtype", SqlDbType.Bit,1),
                    new SqlParameter("@bservice", SqlDbType.Bit,1),
                    new SqlParameter("@cbmemo", SqlDbType.NVarChar,255),
                    new SqlParameter("@cbsysbarcode", SqlDbType.NVarChar,80),
                    new SqlParameter("@cplanmethod", SqlDbType.NVarChar,1),
                    new SqlParameter("@planlotnumber", SqlDbType.NVarChar,40),
                    new SqlParameter("@bgift", SqlDbType.SmallInt,2),
                    new SqlParameter("@cfactorycode", SqlDbType.NVarChar,50),
                    new SqlParameter("@cfactoryname", SqlDbType.NVarChar,255),
                    new SqlParameter("@gcsourceid", SqlDbType.Int,4),
                    new SqlParameter("@gcsourceids", SqlDbType.Int,4),
                    new SqlParameter("@gcupcardnum", SqlDbType.NVarChar,100),
                    new SqlParameter("@gcupid", SqlDbType.Int,4),
                    new SqlParameter("@gcupids", SqlDbType.Int,4),
                    new SqlParameter("@yyc_invname", SqlDbType.NVarChar,255),
                    new SqlParameter("@iOrderAmt_f", SqlDbType.Money,8),
                    new SqlParameter("@iOrderAmt", SqlDbType.Money,8),
                    new SqlParameter("@iNROrderAmt_f", SqlDbType.Money,8),
                    new SqlParameter("@iNROrderAmt", SqlDbType.Money,8),
                    new SqlParameter("@csyssourceautoid", SqlDbType.NVarChar,50)};
            parameters[0].Value = id;
            parameters[1].Value = poid;
            parameters[2].Value = iappids;
            parameters[3].Value = cinvcode;
            parameters[4].Value = cinvname;
            parameters[5].Value = cinvstd;
            parameters[6].Value = cinvaddcode;
            parameters[7].Value = iquotedprice;
            parameters[8].Value = iquantity;
            parameters[9].Value = inum;
            parameters[10].Value = iunitprice;
            parameters[11].Value = imoney;
            parameters[12].Value = itax;
            parameters[13].Value = isum;
            parameters[14].Value = idiscount;
            parameters[15].Value = inatunitprice;
            parameters[16].Value = inatmoney;
            parameters[17].Value = inattax;
            parameters[18].Value = inatsum;
            parameters[19].Value = inatdiscount;
            parameters[20].Value = darrivedate;
            parameters[21].Value = cfree2;
            parameters[22].Value = cfree1;
            parameters[23].Value = cunitid;
            parameters[24].Value = cinvm_unit;
            parameters[25].Value = igrouptype;
            parameters[26].Value = cgroupcode;
            parameters[27].Value = cinva_unit;
            parameters[28].Value = iinvexchrate;
            parameters[29].Value = cinvdefine1;
            parameters[30].Value = cinvdefine2;
            parameters[31].Value = cinvdefine3;
            parameters[32].Value = cinvdefine4;
            parameters[33].Value = cinvdefine5;
            parameters[34].Value = cinvdefine6;
            parameters[35].Value = cinvdefine7;
            parameters[36].Value = cinvdefine8;
            parameters[37].Value = cinvdefine9;
            parameters[38].Value = cinvdefine10;
            parameters[39].Value = ccomunitcode;
            parameters[40].Value = cinvdefine11;
            parameters[41].Value = cinvdefine12;
            parameters[42].Value = cinvdefine13;
            parameters[43].Value = cinvdefine14;
            parameters[44].Value = cinvdefine15;
            parameters[45].Value = cinvdefine16;
            parameters[46].Value = cdefine22;
            parameters[47].Value = cdefine23;
            parameters[48].Value = cdefine24;
            parameters[49].Value = cdefine25;
            parameters[50].Value = cdefine26;
            parameters[51].Value = cdefine27;
            parameters[52].Value = cdefine28;
            parameters[53].Value = cdefine29;
            parameters[54].Value = cdefine30;
            parameters[55].Value = cdefine31;
            parameters[56].Value = cdefine32;
            parameters[57].Value = cdefine33;
            parameters[58].Value = cdefine34;
            parameters[59].Value = cdefine35;
            parameters[60].Value = cdefine36;
            parameters[61].Value = cdefine37;
            parameters[62].Value = ipertaxrate;
            parameters[63].Value = citemcode;
            parameters[64].Value = citemname;
            parameters[65].Value = citem_class;
            parameters[66].Value = citem_name;
            parameters[67].Value = ppcids;
            parameters[68].Value = contractrowguid;
            parameters[69].Value = cfree3;
            parameters[70].Value = cfree4;
            parameters[71].Value = cfree5;
            parameters[72].Value = cfree6;
            parameters[73].Value = cfree7;
            parameters[74].Value = cfree8;
            parameters[75].Value = cfree9;
            parameters[76].Value = cfree10;
            parameters[77].Value = itaxprice;
            parameters[78].Value = isosid;
            parameters[79].Value = cinvauthid;
            parameters[80].Value = btaxcost;
            parameters[81].Value = iarrqty;
            parameters[82].Value = iarrnum;
            parameters[83].Value = iarrmoney;
            parameters[84].Value = inatarrmoney;
            parameters[85].Value = ireceivedqty;
            parameters[86].Value = ireceivednum;
            parameters[87].Value = ireceivedmoney;
            parameters[88].Value = iinvqty;
            parameters[89].Value = iinvnum;
            parameters[90].Value = iinvmoney;
            parameters[91].Value = inatinvmoney;
            parameters[92].Value = ioritotal;
            parameters[93].Value = itotal;
            parameters[94].Value = bgsp;
            parameters[95].Value = csource;
            parameters[96].Value = csocode;
            parameters[97].Value = contractcode;
            parameters[98].Value = contractrowno;
            parameters[99].Value = irowno;
            parameters[100].Value = sotype;
            parameters[101].Value = sodid;
            parameters[102].Value = iinvmpcost;
            parameters[103].Value = cbcloser;
            parameters[104].Value = ippartid;
            parameters[105].Value = ipquantity;
            parameters[106].Value = iptoseq;
            parameters[107].Value = cveninvcode;
            parameters[108].Value = cveninvname;
            parameters[109].Value = cupsocode;
            parameters[110].Value = upsotype;
            parameters[111].Value = iordertype;
            parameters[112].Value = csoordercode;
            parameters[113].Value = iorderseq;
            parameters[114].Value = iorderdid;
            parameters[115].Value = cdemandmemo;
            parameters[116].Value = cbclosetime;
            parameters[117].Value = cbclosedate;
            parameters[118].Value = cbg_itemcode;
            parameters[119].Value = cbg_itemname;
            parameters[120].Value = cbg_caliberkey1;
            parameters[121].Value = cbg_caliberkeyname1;
            parameters[122].Value = cbg_caliberkey2;
            parameters[123].Value = cbg_caliberkeyname2;
            parameters[124].Value = cbg_caliberkey3;
            parameters[125].Value = cbg_caliberkeyname3;
            parameters[126].Value = cbg_calibercode1;
            parameters[127].Value = cbg_calibername1;
            parameters[128].Value = cbg_calibercode2;
            parameters[129].Value = cbg_calibername2;
            parameters[130].Value = cbg_calibercode3;
            parameters[131].Value = cbg_calibername3;
            parameters[132].Value = cbg_caliberkey4;
            parameters[133].Value = cbg_caliberkeyname4;
            parameters[134].Value = cbg_caliberkey5;
            parameters[135].Value = cbg_caliberkeyname5;
            parameters[136].Value = cbg_caliberkey6;
            parameters[137].Value = cbg_caliberkeyname6;
            parameters[138].Value = cbg_calibercode4;
            parameters[139].Value = cbg_calibername4;
            parameters[140].Value = cbg_calibercode5;
            parameters[141].Value = cbg_calibername5;
            parameters[142].Value = cbg_calibercode6;
            parameters[143].Value = cbg_calibername6;
            parameters[144].Value = ibg_ctrl;
            parameters[145].Value = cbg_auditopinion;
            parameters[146].Value = fexquantity;
            parameters[147].Value = fexnum;
            parameters[148].Value = ivouchrowno;
            parameters[149].Value = csrpolicy;
            parameters[150].Value = cxjspdids;
            parameters[151].Value = irequiretrackstyle;
            parameters[152].Value = ipresentb;
            parameters[153].Value = cinvccode;
            parameters[154].Value = binvtype;
            parameters[155].Value = bservice;
            parameters[156].Value = cbmemo;
            parameters[157].Value = cbsysbarcode;
            parameters[158].Value = cplanmethod;
            parameters[159].Value = planlotnumber;
            parameters[160].Value = bgift;
            parameters[161].Value = cfactorycode;
            parameters[162].Value = cfactoryname;
            parameters[163].Value = gcsourceid;
            parameters[164].Value = gcsourceids;
            parameters[165].Value = gcupcardnum;
            parameters[166].Value = gcupid;
            parameters[167].Value = gcupids;
            parameters[168].Value = yyc_invname;
            parameters[169].Value = iOrderAmt_f;
            parameters[170].Value = iOrderAmt;
            parameters[171].Value = iNROrderAmt_f;
            parameters[172].Value = iNROrderAmt;
            parameters[173].Value = csyssourceautoid;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int id, int poid, int iappids, string cinvcode, string cinvname, string cinvstd, string cinvaddcode, decimal iquotedprice, decimal iquantity, decimal inum, decimal iunitprice, decimal imoney, decimal itax, decimal isum, decimal idiscount, decimal inatunitprice, decimal inatmoney, decimal inattax, decimal inatsum, decimal inatdiscount, DateTime darrivedate, string cfree2, string cfree1, string cunitid, string cinvm_unit, int igrouptype, string cgroupcode, string cinva_unit, decimal iinvexchrate, string cinvdefine1, string cinvdefine2, string cinvdefine3, string cinvdefine4, string cinvdefine5, string cinvdefine6, string cinvdefine7, string cinvdefine8, string cinvdefine9, string cinvdefine10, string ccomunitcode, int cinvdefine11, int cinvdefine12, decimal cinvdefine13, decimal cinvdefine14, DateTime cinvdefine15, DateTime cinvdefine16, string cdefine22, string cdefine23, string cdefine24, string cdefine25, decimal cdefine26, decimal cdefine27, string cdefine28, string cdefine29, string cdefine30, string cdefine31, string cdefine32, string cdefine33, int cdefine34, int cdefine35, DateTime cdefine36, DateTime cdefine37, decimal ipertaxrate, string citemcode, string citemname, string citem_class, string citem_name, int ppcids, Guid contractrowguid, string cfree3, string cfree4, string cfree5, string cfree6, string cfree7, string cfree8, string cfree9, string cfree10, decimal itaxprice, int isosid, int cinvauthid, bool btaxcost, decimal iarrqty, decimal iarrnum, decimal iarrmoney, decimal inatarrmoney, decimal ireceivedqty, decimal ireceivednum, decimal ireceivedmoney, decimal iinvqty, decimal iinvnum, decimal iinvmoney, decimal inatinvmoney, decimal ioritotal, decimal itotal, int bgsp, string csource, string csocode, string contractcode, string contractrowno, int irowno, int sotype, string sodid, decimal iinvmpcost, string cbcloser, int ippartid, decimal ipquantity, int iptoseq, string cveninvcode, string cveninvname, string cupsocode, string upsotype, int iordertype, string csoordercode, int iorderseq, int iorderdid, string cdemandmemo, DateTime cbclosetime, DateTime cbclosedate, string cbg_itemcode, string cbg_itemname, string cbg_caliberkey1, string cbg_caliberkeyname1, string cbg_caliberkey2, string cbg_caliberkeyname2, string cbg_caliberkey3, string cbg_caliberkeyname3, string cbg_calibercode1, string cbg_calibername1, string cbg_calibercode2, string cbg_calibername2, string cbg_calibercode3, string cbg_calibername3, string cbg_caliberkey4, string cbg_caliberkeyname4, string cbg_caliberkey5, string cbg_caliberkeyname5, string cbg_caliberkey6, string cbg_caliberkeyname6, string cbg_calibercode4, string cbg_calibername4, string cbg_calibercode5, string cbg_calibername5, string cbg_calibercode6, string cbg_calibername6, int ibg_ctrl, string cbg_auditopinion, decimal fexquantity, decimal fexnum, int ivouchrowno, string csrpolicy, string cxjspdids, int irequiretrackstyle, int ipresentb, string cinvccode, bool binvtype, bool bservice, string cbmemo, string cbsysbarcode, string cplanmethod, string planlotnumber, int bgift, string cfactorycode, string cfactoryname, int gcsourceid, int gcsourceids, string gcupcardnum, int gcupid, int gcupids, string yyc_invname, decimal iOrderAmt_f, decimal iOrderAmt, decimal iNROrderAmt_f, decimal iNROrderAmt, string csyssourceautoid)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from [zpurpotail] ");
            strSql.Append(" where id=@id and poid=@poid and iappids=@iappids and cinvcode=@cinvcode and cinvname=@cinvname and cinvstd=@cinvstd and cinvaddcode=@cinvaddcode and iquotedprice=@iquotedprice and iquantity=@iquantity and inum=@inum and iunitprice=@iunitprice and imoney=@imoney and itax=@itax and isum=@isum and idiscount=@idiscount and inatunitprice=@inatunitprice and inatmoney=@inatmoney and inattax=@inattax and inatsum=@inatsum and inatdiscount=@inatdiscount and darrivedate=@darrivedate and cfree2=@cfree2 and cfree1=@cfree1 and cunitid=@cunitid and cinvm_unit=@cinvm_unit and igrouptype=@igrouptype and cgroupcode=@cgroupcode and cinva_unit=@cinva_unit and iinvexchrate=@iinvexchrate and cinvdefine1=@cinvdefine1 and cinvdefine2=@cinvdefine2 and cinvdefine3=@cinvdefine3 and cinvdefine4=@cinvdefine4 and cinvdefine5=@cinvdefine5 and cinvdefine6=@cinvdefine6 and cinvdefine7=@cinvdefine7 and cinvdefine8=@cinvdefine8 and cinvdefine9=@cinvdefine9 and cinvdefine10=@cinvdefine10 and ccomunitcode=@ccomunitcode and cinvdefine11=@cinvdefine11 and cinvdefine12=@cinvdefine12 and cinvdefine13=@cinvdefine13 and cinvdefine14=@cinvdefine14 and cinvdefine15=@cinvdefine15 and cinvdefine16=@cinvdefine16 and cdefine22=@cdefine22 and cdefine23=@cdefine23 and cdefine24=@cdefine24 and cdefine25=@cdefine25 and cdefine26=@cdefine26 and cdefine27=@cdefine27 and cdefine28=@cdefine28 and cdefine29=@cdefine29 and cdefine30=@cdefine30 and cdefine31=@cdefine31 and cdefine32=@cdefine32 and cdefine33=@cdefine33 and cdefine34=@cdefine34 and cdefine35=@cdefine35 and cdefine36=@cdefine36 and cdefine37=@cdefine37 and ipertaxrate=@ipertaxrate and citemcode=@citemcode and citemname=@citemname and citem_class=@citem_class and citem_name=@citem_name and ppcids=@ppcids and contractrowguid=@contractrowguid and cfree3=@cfree3 and cfree4=@cfree4 and cfree5=@cfree5 and cfree6=@cfree6 and cfree7=@cfree7 and cfree8=@cfree8 and cfree9=@cfree9 and cfree10=@cfree10 and itaxprice=@itaxprice and isosid=@isosid and cinvauthid=@cinvauthid and btaxcost=@btaxcost and iarrqty=@iarrqty and iarrnum=@iarrnum and iarrmoney=@iarrmoney and inatarrmoney=@inatarrmoney and ireceivedqty=@ireceivedqty and ireceivednum=@ireceivednum and ireceivedmoney=@ireceivedmoney and iinvqty=@iinvqty and iinvnum=@iinvnum and iinvmoney=@iinvmoney and inatinvmoney=@inatinvmoney and ioritotal=@ioritotal and itotal=@itotal and bgsp=@bgsp and csource=@csource and csocode=@csocode and contractcode=@contractcode and contractrowno=@contractrowno and irowno=@irowno and sotype=@sotype and sodid=@sodid and iinvmpcost=@iinvmpcost and cbcloser=@cbcloser and ippartid=@ippartid and ipquantity=@ipquantity and iptoseq=@iptoseq and cveninvcode=@cveninvcode and cveninvname=@cveninvname and cupsocode=@cupsocode and upsotype=@upsotype and iordertype=@iordertype and csoordercode=@csoordercode and iorderseq=@iorderseq and iorderdid=@iorderdid and cdemandmemo=@cdemandmemo and cbclosetime=@cbclosetime and cbclosedate=@cbclosedate and cbg_itemcode=@cbg_itemcode and cbg_itemname=@cbg_itemname and cbg_caliberkey1=@cbg_caliberkey1 and cbg_caliberkeyname1=@cbg_caliberkeyname1 and cbg_caliberkey2=@cbg_caliberkey2 and cbg_caliberkeyname2=@cbg_caliberkeyname2 and cbg_caliberkey3=@cbg_caliberkey3 and cbg_caliberkeyname3=@cbg_caliberkeyname3 and cbg_calibercode1=@cbg_calibercode1 and cbg_calibername1=@cbg_calibername1 and cbg_calibercode2=@cbg_calibercode2 and cbg_calibername2=@cbg_calibername2 and cbg_calibercode3=@cbg_calibercode3 and cbg_calibername3=@cbg_calibername3 and cbg_caliberkey4=@cbg_caliberkey4 and cbg_caliberkeyname4=@cbg_caliberkeyname4 and cbg_caliberkey5=@cbg_caliberkey5 and cbg_caliberkeyname5=@cbg_caliberkeyname5 and cbg_caliberkey6=@cbg_caliberkey6 and cbg_caliberkeyname6=@cbg_caliberkeyname6 and cbg_calibercode4=@cbg_calibercode4 and cbg_calibername4=@cbg_calibername4 and cbg_calibercode5=@cbg_calibercode5 and cbg_calibername5=@cbg_calibername5 and cbg_calibercode6=@cbg_calibercode6 and cbg_calibername6=@cbg_calibername6 and ibg_ctrl=@ibg_ctrl and cbg_auditopinion=@cbg_auditopinion and fexquantity=@fexquantity and fexnum=@fexnum and ivouchrowno=@ivouchrowno and csrpolicy=@csrpolicy and cxjspdids=@cxjspdids and irequiretrackstyle=@irequiretrackstyle and ipresentb=@ipresentb and cinvccode=@cinvccode and binvtype=@binvtype and bservice=@bservice and cbmemo=@cbmemo and cbsysbarcode=@cbsysbarcode and cplanmethod=@cplanmethod and planlotnumber=@planlotnumber and bgift=@bgift and cfactorycode=@cfactorycode and cfactoryname=@cfactoryname and gcsourceid=@gcsourceid and gcsourceids=@gcsourceids and gcupcardnum=@gcupcardnum and gcupid=@gcupid and gcupids=@gcupids and yyc_invname=@yyc_invname and iOrderAmt_f=@iOrderAmt_f and iOrderAmt=@iOrderAmt and iNROrderAmt_f=@iNROrderAmt_f and iNROrderAmt=@iNROrderAmt and csyssourceautoid=@csyssourceautoid ");
            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@poid", SqlDbType.Int,4),
                    new SqlParameter("@iappids", SqlDbType.Int,4),
                    new SqlParameter("@cinvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvstd", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvaddcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iquotedprice", SqlDbType.Decimal),
                    new SqlParameter("@iquantity", SqlDbType.Decimal),
                    new SqlParameter("@inum", SqlDbType.Decimal),
                    new SqlParameter("@iunitprice", SqlDbType.Decimal),
                    new SqlParameter("@imoney", SqlDbType.Money),
                    new SqlParameter("@itax", SqlDbType.Money),
                    new SqlParameter("@isum", SqlDbType.Money),
                    new SqlParameter("@idiscount", SqlDbType.Money),
                    new SqlParameter("@inatunitprice", SqlDbType.Decimal),
                    new SqlParameter("@inatmoney", SqlDbType.Money),
                    new SqlParameter("@inattax", SqlDbType.Money),
                    new SqlParameter("@inatsum", SqlDbType.Money),
                    new SqlParameter("@inatdiscount", SqlDbType.Money),
                    new SqlParameter("@darrivedate", SqlDbType.DateTime),
                    new SqlParameter("@cfree2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cunitid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvm_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@igrouptype", SqlDbType.TinyInt),
                    new SqlParameter("@cgroupcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinva_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iinvexchrate", SqlDbType.Decimal),
                    new SqlParameter("@cinvdefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccomunitcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine11", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine12", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine13", SqlDbType.Float),
                    new SqlParameter("@cinvdefine14", SqlDbType.Float),
                    new SqlParameter("@cinvdefine15", SqlDbType.DateTime),
                    new SqlParameter("@cinvdefine16", SqlDbType.DateTime),
                    new SqlParameter("@cdefine22", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine23", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine24", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine25", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine26", SqlDbType.Float),
                    new SqlParameter("@cdefine27", SqlDbType.Float),
                    new SqlParameter("@cdefine28", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine29", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine30", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine31", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine32", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine33", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine34", SqlDbType.Int,4),
                    new SqlParameter("@cdefine35", SqlDbType.Int,4),
                    new SqlParameter("@cdefine36", SqlDbType.DateTime),
                    new SqlParameter("@cdefine37", SqlDbType.DateTime),
                    new SqlParameter("@ipertaxrate", SqlDbType.Decimal),
                    new SqlParameter("@citemcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citemname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_class", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_name", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ppcids", SqlDbType.Int,4),
                    new SqlParameter("@contractrowguid", SqlDbType.UniqueIdentifier),
                    new SqlParameter("@cfree3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@itaxprice", SqlDbType.Decimal),
                    new SqlParameter("@isosid", SqlDbType.Int,4),
                    new SqlParameter("@cinvauthid", SqlDbType.Int,4),
                    new SqlParameter("@btaxcost", SqlDbType.Bit,1),
                    new SqlParameter("@iarrqty", SqlDbType.Decimal),
                    new SqlParameter("@iarrnum", SqlDbType.Decimal),
                    new SqlParameter("@iarrmoney", SqlDbType.Money),
                    new SqlParameter("@inatarrmoney", SqlDbType.Money),
                    new SqlParameter("@ireceivedqty", SqlDbType.Decimal),
                    new SqlParameter("@ireceivednum", SqlDbType.Decimal),
                    new SqlParameter("@ireceivedmoney", SqlDbType.Money),
                    new SqlParameter("@iinvqty", SqlDbType.Decimal),
                    new SqlParameter("@iinvnum", SqlDbType.Decimal),
                    new SqlParameter("@iinvmoney", SqlDbType.Money),
                    new SqlParameter("@inatinvmoney", SqlDbType.Money),
                    new SqlParameter("@ioritotal", SqlDbType.Money),
                    new SqlParameter("@itotal", SqlDbType.Money),
                    new SqlParameter("@bgsp", SqlDbType.TinyInt),
                    new SqlParameter("@csource", SqlDbType.NVarChar,-1),
                    new SqlParameter("@csocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@contractcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@contractrowno", SqlDbType.NVarChar,-1),
                    new SqlParameter("@irowno", SqlDbType.Int,4),
                    new SqlParameter("@sotype", SqlDbType.TinyInt),
                    new SqlParameter("@sodid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iinvmpcost", SqlDbType.Decimal),
                    new SqlParameter("@cbcloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ippartid", SqlDbType.Int,4),
                    new SqlParameter("@ipquantity", SqlDbType.Decimal),
                    new SqlParameter("@iptoseq", SqlDbType.Int,4),
                    new SqlParameter("@cveninvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cveninvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cupsocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@upsotype", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iordertype", SqlDbType.TinyInt),
                    new SqlParameter("@csoordercode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iorderseq", SqlDbType.Int,4),
                    new SqlParameter("@iorderdid", SqlDbType.Int,4),
                    new SqlParameter("@cdemandmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbclosetime", SqlDbType.DateTime),
                    new SqlParameter("@cbclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cbg_itemcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_itemname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ibg_ctrl", SqlDbType.TinyInt),
                    new SqlParameter("@cbg_auditopinion", SqlDbType.NVarChar,-1),
                    new SqlParameter("@fexquantity", SqlDbType.Decimal),
                    new SqlParameter("@fexnum", SqlDbType.Decimal),
                    new SqlParameter("@ivouchrowno", SqlDbType.Int,4),
                    new SqlParameter("@csrpolicy", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cxjspdids", SqlDbType.NVarChar,-1),
                    new SqlParameter("@irequiretrackstyle", SqlDbType.Int,4),
                    new SqlParameter("@ipresentb", SqlDbType.Int,4),
                    new SqlParameter("@cinvccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@binvtype", SqlDbType.Bit,1),
                    new SqlParameter("@bservice", SqlDbType.Bit,1),
                    new SqlParameter("@cbmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbsysbarcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cplanmethod", SqlDbType.NVarChar,-1),
                    new SqlParameter("@planlotnumber", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bgift", SqlDbType.SmallInt),
                    new SqlParameter("@cfactorycode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfactoryname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@gcsourceid", SqlDbType.Int,4),
                    new SqlParameter("@gcsourceids", SqlDbType.Int,4),
                    new SqlParameter("@gcupcardnum", SqlDbType.NVarChar,-1),
                    new SqlParameter("@gcupid", SqlDbType.Int,4),
                    new SqlParameter("@gcupids", SqlDbType.Int,4),
                    new SqlParameter("@yyc_invname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iOrderAmt_f", SqlDbType.Money),
                    new SqlParameter("@iOrderAmt", SqlDbType.Money),
                    new SqlParameter("@iNROrderAmt_f", SqlDbType.Money),
                    new SqlParameter("@iNROrderAmt", SqlDbType.Money),
                    new SqlParameter("@csyssourceautoid", SqlDbType.NVarChar,-1)};
            parameters[0].Value = id;
            parameters[1].Value = poid;
            parameters[2].Value = iappids;
            parameters[3].Value = cinvcode;
            parameters[4].Value = cinvname;
            parameters[5].Value = cinvstd;
            parameters[6].Value = cinvaddcode;
            parameters[7].Value = iquotedprice;
            parameters[8].Value = iquantity;
            parameters[9].Value = inum;
            parameters[10].Value = iunitprice;
            parameters[11].Value = imoney;
            parameters[12].Value = itax;
            parameters[13].Value = isum;
            parameters[14].Value = idiscount;
            parameters[15].Value = inatunitprice;
            parameters[16].Value = inatmoney;
            parameters[17].Value = inattax;
            parameters[18].Value = inatsum;
            parameters[19].Value = inatdiscount;
            parameters[20].Value = darrivedate;
            parameters[21].Value = cfree2;
            parameters[22].Value = cfree1;
            parameters[23].Value = cunitid;
            parameters[24].Value = cinvm_unit;
            parameters[25].Value = igrouptype;
            parameters[26].Value = cgroupcode;
            parameters[27].Value = cinva_unit;
            parameters[28].Value = iinvexchrate;
            parameters[29].Value = cinvdefine1;
            parameters[30].Value = cinvdefine2;
            parameters[31].Value = cinvdefine3;
            parameters[32].Value = cinvdefine4;
            parameters[33].Value = cinvdefine5;
            parameters[34].Value = cinvdefine6;
            parameters[35].Value = cinvdefine7;
            parameters[36].Value = cinvdefine8;
            parameters[37].Value = cinvdefine9;
            parameters[38].Value = cinvdefine10;
            parameters[39].Value = ccomunitcode;
            parameters[40].Value = cinvdefine11;
            parameters[41].Value = cinvdefine12;
            parameters[42].Value = cinvdefine13;
            parameters[43].Value = cinvdefine14;
            parameters[44].Value = cinvdefine15;
            parameters[45].Value = cinvdefine16;
            parameters[46].Value = cdefine22;
            parameters[47].Value = cdefine23;
            parameters[48].Value = cdefine24;
            parameters[49].Value = cdefine25;
            parameters[50].Value = cdefine26;
            parameters[51].Value = cdefine27;
            parameters[52].Value = cdefine28;
            parameters[53].Value = cdefine29;
            parameters[54].Value = cdefine30;
            parameters[55].Value = cdefine31;
            parameters[56].Value = cdefine32;
            parameters[57].Value = cdefine33;
            parameters[58].Value = cdefine34;
            parameters[59].Value = cdefine35;
            parameters[60].Value = cdefine36;
            parameters[61].Value = cdefine37;
            parameters[62].Value = ipertaxrate;
            parameters[63].Value = citemcode;
            parameters[64].Value = citemname;
            parameters[65].Value = citem_class;
            parameters[66].Value = citem_name;
            parameters[67].Value = ppcids;
            parameters[68].Value = contractrowguid;
            parameters[69].Value = cfree3;
            parameters[70].Value = cfree4;
            parameters[71].Value = cfree5;
            parameters[72].Value = cfree6;
            parameters[73].Value = cfree7;
            parameters[74].Value = cfree8;
            parameters[75].Value = cfree9;
            parameters[76].Value = cfree10;
            parameters[77].Value = itaxprice;
            parameters[78].Value = isosid;
            parameters[79].Value = cinvauthid;
            parameters[80].Value = btaxcost;
            parameters[81].Value = iarrqty;
            parameters[82].Value = iarrnum;
            parameters[83].Value = iarrmoney;
            parameters[84].Value = inatarrmoney;
            parameters[85].Value = ireceivedqty;
            parameters[86].Value = ireceivednum;
            parameters[87].Value = ireceivedmoney;
            parameters[88].Value = iinvqty;
            parameters[89].Value = iinvnum;
            parameters[90].Value = iinvmoney;
            parameters[91].Value = inatinvmoney;
            parameters[92].Value = ioritotal;
            parameters[93].Value = itotal;
            parameters[94].Value = bgsp;
            parameters[95].Value = csource;
            parameters[96].Value = csocode;
            parameters[97].Value = contractcode;
            parameters[98].Value = contractrowno;
            parameters[99].Value = irowno;
            parameters[100].Value = sotype;
            parameters[101].Value = sodid;
            parameters[102].Value = iinvmpcost;
            parameters[103].Value = cbcloser;
            parameters[104].Value = ippartid;
            parameters[105].Value = ipquantity;
            parameters[106].Value = iptoseq;
            parameters[107].Value = cveninvcode;
            parameters[108].Value = cveninvname;
            parameters[109].Value = cupsocode;
            parameters[110].Value = upsotype;
            parameters[111].Value = iordertype;
            parameters[112].Value = csoordercode;
            parameters[113].Value = iorderseq;
            parameters[114].Value = iorderdid;
            parameters[115].Value = cdemandmemo;
            parameters[116].Value = cbclosetime;
            parameters[117].Value = cbclosedate;
            parameters[118].Value = cbg_itemcode;
            parameters[119].Value = cbg_itemname;
            parameters[120].Value = cbg_caliberkey1;
            parameters[121].Value = cbg_caliberkeyname1;
            parameters[122].Value = cbg_caliberkey2;
            parameters[123].Value = cbg_caliberkeyname2;
            parameters[124].Value = cbg_caliberkey3;
            parameters[125].Value = cbg_caliberkeyname3;
            parameters[126].Value = cbg_calibercode1;
            parameters[127].Value = cbg_calibername1;
            parameters[128].Value = cbg_calibercode2;
            parameters[129].Value = cbg_calibername2;
            parameters[130].Value = cbg_calibercode3;
            parameters[131].Value = cbg_calibername3;
            parameters[132].Value = cbg_caliberkey4;
            parameters[133].Value = cbg_caliberkeyname4;
            parameters[134].Value = cbg_caliberkey5;
            parameters[135].Value = cbg_caliberkeyname5;
            parameters[136].Value = cbg_caliberkey6;
            parameters[137].Value = cbg_caliberkeyname6;
            parameters[138].Value = cbg_calibercode4;
            parameters[139].Value = cbg_calibername4;
            parameters[140].Value = cbg_calibercode5;
            parameters[141].Value = cbg_calibername5;
            parameters[142].Value = cbg_calibercode6;
            parameters[143].Value = cbg_calibername6;
            parameters[144].Value = ibg_ctrl;
            parameters[145].Value = cbg_auditopinion;
            parameters[146].Value = fexquantity;
            parameters[147].Value = fexnum;
            parameters[148].Value = ivouchrowno;
            parameters[149].Value = csrpolicy;
            parameters[150].Value = cxjspdids;
            parameters[151].Value = irequiretrackstyle;
            parameters[152].Value = ipresentb;
            parameters[153].Value = cinvccode;
            parameters[154].Value = binvtype;
            parameters[155].Value = bservice;
            parameters[156].Value = cbmemo;
            parameters[157].Value = cbsysbarcode;
            parameters[158].Value = cplanmethod;
            parameters[159].Value = planlotnumber;
            parameters[160].Value = bgift;
            parameters[161].Value = cfactorycode;
            parameters[162].Value = cfactoryname;
            parameters[163].Value = gcsourceid;
            parameters[164].Value = gcsourceids;
            parameters[165].Value = gcupcardnum;
            parameters[166].Value = gcupid;
            parameters[167].Value = gcupids;
            parameters[168].Value = yyc_invname;
            parameters[169].Value = iOrderAmt_f;
            parameters[170].Value = iOrderAmt;
            parameters[171].Value = iNROrderAmt_f;
            parameters[172].Value = iNROrderAmt;
            parameters[173].Value = csyssourceautoid;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public void GetModel(int id, int poid, int iappids, string cinvcode, string cinvname, string cinvstd, string cinvaddcode, decimal iquotedprice, decimal iquantity, decimal inum, decimal iunitprice, decimal imoney, decimal itax, decimal isum, decimal idiscount, decimal inatunitprice, decimal inatmoney, decimal inattax, decimal inatsum, decimal inatdiscount, DateTime darrivedate, string cfree2, string cfree1, string cunitid, string cinvm_unit, int igrouptype, string cgroupcode, string cinva_unit, decimal iinvexchrate, string cinvdefine1, string cinvdefine2, string cinvdefine3, string cinvdefine4, string cinvdefine5, string cinvdefine6, string cinvdefine7, string cinvdefine8, string cinvdefine9, string cinvdefine10, string ccomunitcode, int cinvdefine11, int cinvdefine12, decimal cinvdefine13, decimal cinvdefine14, DateTime cinvdefine15, DateTime cinvdefine16, string cdefine22, string cdefine23, string cdefine24, string cdefine25, decimal cdefine26, decimal cdefine27, string cdefine28, string cdefine29, string cdefine30, string cdefine31, string cdefine32, string cdefine33, int cdefine34, int cdefine35, DateTime cdefine36, DateTime cdefine37, decimal ipertaxrate, string citemcode, string citemname, string citem_class, string citem_name, int ppcids, Guid contractrowguid, string cfree3, string cfree4, string cfree5, string cfree6, string cfree7, string cfree8, string cfree9, string cfree10, decimal itaxprice, int isosid, int cinvauthid, bool btaxcost, decimal iarrqty, decimal iarrnum, decimal iarrmoney, decimal inatarrmoney, decimal ireceivedqty, decimal ireceivednum, decimal ireceivedmoney, decimal iinvqty, decimal iinvnum, decimal iinvmoney, decimal inatinvmoney, decimal ioritotal, decimal itotal, int bgsp, string csource, string csocode, string contractcode, string contractrowno, int irowno, int sotype, string sodid, decimal iinvmpcost, string cbcloser, int ippartid, decimal ipquantity, int iptoseq, string cveninvcode, string cveninvname, string cupsocode, string upsotype, int iordertype, string csoordercode, int iorderseq, int iorderdid, string cdemandmemo, DateTime cbclosetime, DateTime cbclosedate, string cbg_itemcode, string cbg_itemname, string cbg_caliberkey1, string cbg_caliberkeyname1, string cbg_caliberkey2, string cbg_caliberkeyname2, string cbg_caliberkey3, string cbg_caliberkeyname3, string cbg_calibercode1, string cbg_calibername1, string cbg_calibercode2, string cbg_calibername2, string cbg_calibercode3, string cbg_calibername3, string cbg_caliberkey4, string cbg_caliberkeyname4, string cbg_caliberkey5, string cbg_caliberkeyname5, string cbg_caliberkey6, string cbg_caliberkeyname6, string cbg_calibercode4, string cbg_calibername4, string cbg_calibercode5, string cbg_calibername5, string cbg_calibercode6, string cbg_calibername6, int ibg_ctrl, string cbg_auditopinion, decimal fexquantity, decimal fexnum, int ivouchrowno, string csrpolicy, string cxjspdids, int irequiretrackstyle, int ipresentb, string cinvccode, bool binvtype, bool bservice, string cbmemo, string cbsysbarcode, string cplanmethod, string planlotnumber, int bgift, string cfactorycode, string cfactoryname, int gcsourceid, int gcsourceids, string gcupcardnum, int gcupid, int gcupids, string yyc_invname, decimal iOrderAmt_f, decimal iOrderAmt, decimal iNROrderAmt_f, decimal iNROrderAmt, string csyssourceautoid)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select id,poid,iappids,cinvcode,cinvname,cinvstd,cinvaddcode,iquotedprice,iquantity,inum,iunitprice,imoney,itax,isum,idiscount,inatunitprice,inatmoney,inattax,inatsum,inatdiscount,darrivedate,cfree2,cfree1,cunitid,cinvm_unit,igrouptype,cgroupcode,cinva_unit,iinvexchrate,cinvdefine1,cinvdefine2,cinvdefine3,cinvdefine4,cinvdefine5,cinvdefine6,cinvdefine7,cinvdefine8,cinvdefine9,cinvdefine10,ccomunitcode,cinvdefine11,cinvdefine12,cinvdefine13,cinvdefine14,cinvdefine15,cinvdefine16,cdefine22,cdefine23,cdefine24,cdefine25,cdefine26,cdefine27,cdefine28,cdefine29,cdefine30,cdefine31,cdefine32,cdefine33,cdefine34,cdefine35,cdefine36,cdefine37,ipertaxrate,citemcode,citemname,citem_class,citem_name,ppcids,contractrowguid,cfree3,cfree4,cfree5,cfree6,cfree7,cfree8,cfree9,cfree10,itaxprice,isosid,cinvauthid,btaxcost,iarrqty,iarrnum,iarrmoney,inatarrmoney,ireceivedqty,ireceivednum,ireceivedmoney,iinvqty,iinvnum,iinvmoney,inatinvmoney,ioritotal,itotal,bgsp,csource,csocode,contractcode,contractrowno,irowno,sotype,sodid,iinvmpcost,cbcloser,ippartid,ipquantity,iptoseq,cveninvcode,cveninvname,cupsocode,upsotype,iordertype,csoordercode,iorderseq,iorderdid,cdemandmemo,cbclosetime,cbclosedate,cbg_itemcode,cbg_itemname,cbg_caliberkey1,cbg_caliberkeyname1,cbg_caliberkey2,cbg_caliberkeyname2,cbg_caliberkey3,cbg_caliberkeyname3,cbg_calibercode1,cbg_calibername1,cbg_calibercode2,cbg_calibername2,cbg_calibercode3,cbg_calibername3,cbg_caliberkey4,cbg_caliberkeyname4,cbg_caliberkey5,cbg_caliberkeyname5,cbg_caliberkey6,cbg_caliberkeyname6,cbg_calibercode4,cbg_calibername4,cbg_calibercode5,cbg_calibername5,cbg_calibercode6,cbg_calibername6,ibg_ctrl,cbg_auditopinion,fexquantity,fexnum,ivouchrowno,csrpolicy,cxjspdids,irequiretrackstyle,ipresentb,cinvccode,binvtype,bservice,cbmemo,cbsysbarcode,cplanmethod,planlotnumber,bgift,cfactorycode,cfactoryname,gcsourceid,gcsourceids,gcupcardnum,gcupid,gcupids,yyc_invname,iOrderAmt_f,iOrderAmt,iNROrderAmt_f,iNROrderAmt,csyssourceautoid ");
            strSql.Append(" FROM [zpurpotail] ");
            strSql.Append(" where id=@id and poid=@poid and iappids=@iappids and cinvcode=@cinvcode and cinvname=@cinvname and cinvstd=@cinvstd and cinvaddcode=@cinvaddcode and iquotedprice=@iquotedprice and iquantity=@iquantity and inum=@inum and iunitprice=@iunitprice and imoney=@imoney and itax=@itax and isum=@isum and idiscount=@idiscount and inatunitprice=@inatunitprice and inatmoney=@inatmoney and inattax=@inattax and inatsum=@inatsum and inatdiscount=@inatdiscount and darrivedate=@darrivedate and cfree2=@cfree2 and cfree1=@cfree1 and cunitid=@cunitid and cinvm_unit=@cinvm_unit and igrouptype=@igrouptype and cgroupcode=@cgroupcode and cinva_unit=@cinva_unit and iinvexchrate=@iinvexchrate and cinvdefine1=@cinvdefine1 and cinvdefine2=@cinvdefine2 and cinvdefine3=@cinvdefine3 and cinvdefine4=@cinvdefine4 and cinvdefine5=@cinvdefine5 and cinvdefine6=@cinvdefine6 and cinvdefine7=@cinvdefine7 and cinvdefine8=@cinvdefine8 and cinvdefine9=@cinvdefine9 and cinvdefine10=@cinvdefine10 and ccomunitcode=@ccomunitcode and cinvdefine11=@cinvdefine11 and cinvdefine12=@cinvdefine12 and cinvdefine13=@cinvdefine13 and cinvdefine14=@cinvdefine14 and cinvdefine15=@cinvdefine15 and cinvdefine16=@cinvdefine16 and cdefine22=@cdefine22 and cdefine23=@cdefine23 and cdefine24=@cdefine24 and cdefine25=@cdefine25 and cdefine26=@cdefine26 and cdefine27=@cdefine27 and cdefine28=@cdefine28 and cdefine29=@cdefine29 and cdefine30=@cdefine30 and cdefine31=@cdefine31 and cdefine32=@cdefine32 and cdefine33=@cdefine33 and cdefine34=@cdefine34 and cdefine35=@cdefine35 and cdefine36=@cdefine36 and cdefine37=@cdefine37 and ipertaxrate=@ipertaxrate and citemcode=@citemcode and citemname=@citemname and citem_class=@citem_class and citem_name=@citem_name and ppcids=@ppcids and contractrowguid=@contractrowguid and cfree3=@cfree3 and cfree4=@cfree4 and cfree5=@cfree5 and cfree6=@cfree6 and cfree7=@cfree7 and cfree8=@cfree8 and cfree9=@cfree9 and cfree10=@cfree10 and itaxprice=@itaxprice and isosid=@isosid and cinvauthid=@cinvauthid and btaxcost=@btaxcost and iarrqty=@iarrqty and iarrnum=@iarrnum and iarrmoney=@iarrmoney and inatarrmoney=@inatarrmoney and ireceivedqty=@ireceivedqty and ireceivednum=@ireceivednum and ireceivedmoney=@ireceivedmoney and iinvqty=@iinvqty and iinvnum=@iinvnum and iinvmoney=@iinvmoney and inatinvmoney=@inatinvmoney and ioritotal=@ioritotal and itotal=@itotal and bgsp=@bgsp and csource=@csource and csocode=@csocode and contractcode=@contractcode and contractrowno=@contractrowno and irowno=@irowno and sotype=@sotype and sodid=@sodid and iinvmpcost=@iinvmpcost and cbcloser=@cbcloser and ippartid=@ippartid and ipquantity=@ipquantity and iptoseq=@iptoseq and cveninvcode=@cveninvcode and cveninvname=@cveninvname and cupsocode=@cupsocode and upsotype=@upsotype and iordertype=@iordertype and csoordercode=@csoordercode and iorderseq=@iorderseq and iorderdid=@iorderdid and cdemandmemo=@cdemandmemo and cbclosetime=@cbclosetime and cbclosedate=@cbclosedate and cbg_itemcode=@cbg_itemcode and cbg_itemname=@cbg_itemname and cbg_caliberkey1=@cbg_caliberkey1 and cbg_caliberkeyname1=@cbg_caliberkeyname1 and cbg_caliberkey2=@cbg_caliberkey2 and cbg_caliberkeyname2=@cbg_caliberkeyname2 and cbg_caliberkey3=@cbg_caliberkey3 and cbg_caliberkeyname3=@cbg_caliberkeyname3 and cbg_calibercode1=@cbg_calibercode1 and cbg_calibername1=@cbg_calibername1 and cbg_calibercode2=@cbg_calibercode2 and cbg_calibername2=@cbg_calibername2 and cbg_calibercode3=@cbg_calibercode3 and cbg_calibername3=@cbg_calibername3 and cbg_caliberkey4=@cbg_caliberkey4 and cbg_caliberkeyname4=@cbg_caliberkeyname4 and cbg_caliberkey5=@cbg_caliberkey5 and cbg_caliberkeyname5=@cbg_caliberkeyname5 and cbg_caliberkey6=@cbg_caliberkey6 and cbg_caliberkeyname6=@cbg_caliberkeyname6 and cbg_calibercode4=@cbg_calibercode4 and cbg_calibername4=@cbg_calibername4 and cbg_calibercode5=@cbg_calibercode5 and cbg_calibername5=@cbg_calibername5 and cbg_calibercode6=@cbg_calibercode6 and cbg_calibername6=@cbg_calibername6 and ibg_ctrl=@ibg_ctrl and cbg_auditopinion=@cbg_auditopinion and fexquantity=@fexquantity and fexnum=@fexnum and ivouchrowno=@ivouchrowno and csrpolicy=@csrpolicy and cxjspdids=@cxjspdids and irequiretrackstyle=@irequiretrackstyle and ipresentb=@ipresentb and cinvccode=@cinvccode and binvtype=@binvtype and bservice=@bservice and cbmemo=@cbmemo and cbsysbarcode=@cbsysbarcode and cplanmethod=@cplanmethod and planlotnumber=@planlotnumber and bgift=@bgift and cfactorycode=@cfactorycode and cfactoryname=@cfactoryname and gcsourceid=@gcsourceid and gcsourceids=@gcsourceids and gcupcardnum=@gcupcardnum and gcupid=@gcupid and gcupids=@gcupids and yyc_invname=@yyc_invname and iOrderAmt_f=@iOrderAmt_f and iOrderAmt=@iOrderAmt and iNROrderAmt_f=@iNROrderAmt_f and iNROrderAmt=@iNROrderAmt and csyssourceautoid=@csyssourceautoid ");
            SqlParameter[] parameters = {
                    new SqlParameter("@id", SqlDbType.Int,4),
                    new SqlParameter("@poid", SqlDbType.Int,4),
                    new SqlParameter("@iappids", SqlDbType.Int,4),
                    new SqlParameter("@cinvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvstd", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvaddcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iquotedprice", SqlDbType.Decimal),
                    new SqlParameter("@iquantity", SqlDbType.Decimal),
                    new SqlParameter("@inum", SqlDbType.Decimal),
                    new SqlParameter("@iunitprice", SqlDbType.Decimal),
                    new SqlParameter("@imoney", SqlDbType.Money),
                    new SqlParameter("@itax", SqlDbType.Money),
                    new SqlParameter("@isum", SqlDbType.Money),
                    new SqlParameter("@idiscount", SqlDbType.Money),
                    new SqlParameter("@inatunitprice", SqlDbType.Decimal),
                    new SqlParameter("@inatmoney", SqlDbType.Money),
                    new SqlParameter("@inattax", SqlDbType.Money),
                    new SqlParameter("@inatsum", SqlDbType.Money),
                    new SqlParameter("@inatdiscount", SqlDbType.Money),
                    new SqlParameter("@darrivedate", SqlDbType.DateTime),
                    new SqlParameter("@cfree2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cunitid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvm_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@igrouptype", SqlDbType.TinyInt),
                    new SqlParameter("@cgroupcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinva_unit", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iinvexchrate", SqlDbType.Decimal),
                    new SqlParameter("@cinvdefine1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ccomunitcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cinvdefine11", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine12", SqlDbType.Int,4),
                    new SqlParameter("@cinvdefine13", SqlDbType.Float),
                    new SqlParameter("@cinvdefine14", SqlDbType.Float),
                    new SqlParameter("@cinvdefine15", SqlDbType.DateTime),
                    new SqlParameter("@cinvdefine16", SqlDbType.DateTime),
                    new SqlParameter("@cdefine22", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine23", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine24", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine25", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine26", SqlDbType.Float),
                    new SqlParameter("@cdefine27", SqlDbType.Float),
                    new SqlParameter("@cdefine28", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine29", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine30", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine31", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine32", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine33", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cdefine34", SqlDbType.Int,4),
                    new SqlParameter("@cdefine35", SqlDbType.Int,4),
                    new SqlParameter("@cdefine36", SqlDbType.DateTime),
                    new SqlParameter("@cdefine37", SqlDbType.DateTime),
                    new SqlParameter("@ipertaxrate", SqlDbType.Decimal),
                    new SqlParameter("@citemcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citemname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_class", SqlDbType.NVarChar,-1),
                    new SqlParameter("@citem_name", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ppcids", SqlDbType.Int,4),
                    new SqlParameter("@contractrowguid", SqlDbType.UniqueIdentifier),
                    new SqlParameter("@cfree3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree7", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree8", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree9", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfree10", SqlDbType.NVarChar,-1),
                    new SqlParameter("@itaxprice", SqlDbType.Decimal),
                    new SqlParameter("@isosid", SqlDbType.Int,4),
                    new SqlParameter("@cinvauthid", SqlDbType.Int,4),
                    new SqlParameter("@btaxcost", SqlDbType.Bit,1),
                    new SqlParameter("@iarrqty", SqlDbType.Decimal),
                    new SqlParameter("@iarrnum", SqlDbType.Decimal),
                    new SqlParameter("@iarrmoney", SqlDbType.Money),
                    new SqlParameter("@inatarrmoney", SqlDbType.Money),
                    new SqlParameter("@ireceivedqty", SqlDbType.Decimal),
                    new SqlParameter("@ireceivednum", SqlDbType.Decimal),
                    new SqlParameter("@ireceivedmoney", SqlDbType.Money),
                    new SqlParameter("@iinvqty", SqlDbType.Decimal),
                    new SqlParameter("@iinvnum", SqlDbType.Decimal),
                    new SqlParameter("@iinvmoney", SqlDbType.Money),
                    new SqlParameter("@inatinvmoney", SqlDbType.Money),
                    new SqlParameter("@ioritotal", SqlDbType.Money),
                    new SqlParameter("@itotal", SqlDbType.Money),
                    new SqlParameter("@bgsp", SqlDbType.TinyInt),
                    new SqlParameter("@csource", SqlDbType.NVarChar,-1),
                    new SqlParameter("@csocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@contractcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@contractrowno", SqlDbType.NVarChar,-1),
                    new SqlParameter("@irowno", SqlDbType.Int,4),
                    new SqlParameter("@sotype", SqlDbType.TinyInt),
                    new SqlParameter("@sodid", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iinvmpcost", SqlDbType.Decimal),
                    new SqlParameter("@cbcloser", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ippartid", SqlDbType.Int,4),
                    new SqlParameter("@ipquantity", SqlDbType.Decimal),
                    new SqlParameter("@iptoseq", SqlDbType.Int,4),
                    new SqlParameter("@cveninvcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cveninvname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cupsocode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@upsotype", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iordertype", SqlDbType.TinyInt),
                    new SqlParameter("@csoordercode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iorderseq", SqlDbType.Int,4),
                    new SqlParameter("@iorderdid", SqlDbType.Int,4),
                    new SqlParameter("@cdemandmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbclosetime", SqlDbType.DateTime),
                    new SqlParameter("@cbclosedate", SqlDbType.DateTime),
                    new SqlParameter("@cbg_itemcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_itemname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername1", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername2", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername3", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkey6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_caliberkeyname6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername4", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername5", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibercode6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbg_calibername6", SqlDbType.NVarChar,-1),
                    new SqlParameter("@ibg_ctrl", SqlDbType.TinyInt),
                    new SqlParameter("@cbg_auditopinion", SqlDbType.NVarChar,-1),
                    new SqlParameter("@fexquantity", SqlDbType.Decimal),
                    new SqlParameter("@fexnum", SqlDbType.Decimal),
                    new SqlParameter("@ivouchrowno", SqlDbType.Int,4),
                    new SqlParameter("@csrpolicy", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cxjspdids", SqlDbType.NVarChar,-1),
                    new SqlParameter("@irequiretrackstyle", SqlDbType.Int,4),
                    new SqlParameter("@ipresentb", SqlDbType.Int,4),
                    new SqlParameter("@cinvccode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@binvtype", SqlDbType.Bit,1),
                    new SqlParameter("@bservice", SqlDbType.Bit,1),
                    new SqlParameter("@cbmemo", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cbsysbarcode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cplanmethod", SqlDbType.NVarChar,-1),
                    new SqlParameter("@planlotnumber", SqlDbType.NVarChar,-1),
                    new SqlParameter("@bgift", SqlDbType.SmallInt),
                    new SqlParameter("@cfactorycode", SqlDbType.NVarChar,-1),
                    new SqlParameter("@cfactoryname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@gcsourceid", SqlDbType.Int,4),
                    new SqlParameter("@gcsourceids", SqlDbType.Int,4),
                    new SqlParameter("@gcupcardnum", SqlDbType.NVarChar,-1),
                    new SqlParameter("@gcupid", SqlDbType.Int,4),
                    new SqlParameter("@gcupids", SqlDbType.Int,4),
                    new SqlParameter("@yyc_invname", SqlDbType.NVarChar,-1),
                    new SqlParameter("@iOrderAmt_f", SqlDbType.Money),
                    new SqlParameter("@iOrderAmt", SqlDbType.Money),
                    new SqlParameter("@iNROrderAmt_f", SqlDbType.Money),
                    new SqlParameter("@iNROrderAmt", SqlDbType.Money),
                    new SqlParameter("@csyssourceautoid", SqlDbType.NVarChar,-1)};
            parameters[0].Value = id;
            parameters[1].Value = poid;
            parameters[2].Value = iappids;
            parameters[3].Value = cinvcode;
            parameters[4].Value = cinvname;
            parameters[5].Value = cinvstd;
            parameters[6].Value = cinvaddcode;
            parameters[7].Value = iquotedprice;
            parameters[8].Value = iquantity;
            parameters[9].Value = inum;
            parameters[10].Value = iunitprice;
            parameters[11].Value = imoney;
            parameters[12].Value = itax;
            parameters[13].Value = isum;
            parameters[14].Value = idiscount;
            parameters[15].Value = inatunitprice;
            parameters[16].Value = inatmoney;
            parameters[17].Value = inattax;
            parameters[18].Value = inatsum;
            parameters[19].Value = inatdiscount;
            parameters[20].Value = darrivedate;
            parameters[21].Value = cfree2;
            parameters[22].Value = cfree1;
            parameters[23].Value = cunitid;
            parameters[24].Value = cinvm_unit;
            parameters[25].Value = igrouptype;
            parameters[26].Value = cgroupcode;
            parameters[27].Value = cinva_unit;
            parameters[28].Value = iinvexchrate;
            parameters[29].Value = cinvdefine1;
            parameters[30].Value = cinvdefine2;
            parameters[31].Value = cinvdefine3;
            parameters[32].Value = cinvdefine4;
            parameters[33].Value = cinvdefine5;
            parameters[34].Value = cinvdefine6;
            parameters[35].Value = cinvdefine7;
            parameters[36].Value = cinvdefine8;
            parameters[37].Value = cinvdefine9;
            parameters[38].Value = cinvdefine10;
            parameters[39].Value = ccomunitcode;
            parameters[40].Value = cinvdefine11;
            parameters[41].Value = cinvdefine12;
            parameters[42].Value = cinvdefine13;
            parameters[43].Value = cinvdefine14;
            parameters[44].Value = cinvdefine15;
            parameters[45].Value = cinvdefine16;
            parameters[46].Value = cdefine22;
            parameters[47].Value = cdefine23;
            parameters[48].Value = cdefine24;
            parameters[49].Value = cdefine25;
            parameters[50].Value = cdefine26;
            parameters[51].Value = cdefine27;
            parameters[52].Value = cdefine28;
            parameters[53].Value = cdefine29;
            parameters[54].Value = cdefine30;
            parameters[55].Value = cdefine31;
            parameters[56].Value = cdefine32;
            parameters[57].Value = cdefine33;
            parameters[58].Value = cdefine34;
            parameters[59].Value = cdefine35;
            parameters[60].Value = cdefine36;
            parameters[61].Value = cdefine37;
            parameters[62].Value = ipertaxrate;
            parameters[63].Value = citemcode;
            parameters[64].Value = citemname;
            parameters[65].Value = citem_class;
            parameters[66].Value = citem_name;
            parameters[67].Value = ppcids;
            parameters[68].Value = contractrowguid;
            parameters[69].Value = cfree3;
            parameters[70].Value = cfree4;
            parameters[71].Value = cfree5;
            parameters[72].Value = cfree6;
            parameters[73].Value = cfree7;
            parameters[74].Value = cfree8;
            parameters[75].Value = cfree9;
            parameters[76].Value = cfree10;
            parameters[77].Value = itaxprice;
            parameters[78].Value = isosid;
            parameters[79].Value = cinvauthid;
            parameters[80].Value = btaxcost;
            parameters[81].Value = iarrqty;
            parameters[82].Value = iarrnum;
            parameters[83].Value = iarrmoney;
            parameters[84].Value = inatarrmoney;
            parameters[85].Value = ireceivedqty;
            parameters[86].Value = ireceivednum;
            parameters[87].Value = ireceivedmoney;
            parameters[88].Value = iinvqty;
            parameters[89].Value = iinvnum;
            parameters[90].Value = iinvmoney;
            parameters[91].Value = inatinvmoney;
            parameters[92].Value = ioritotal;
            parameters[93].Value = itotal;
            parameters[94].Value = bgsp;
            parameters[95].Value = csource;
            parameters[96].Value = csocode;
            parameters[97].Value = contractcode;
            parameters[98].Value = contractrowno;
            parameters[99].Value = irowno;
            parameters[100].Value = sotype;
            parameters[101].Value = sodid;
            parameters[102].Value = iinvmpcost;
            parameters[103].Value = cbcloser;
            parameters[104].Value = ippartid;
            parameters[105].Value = ipquantity;
            parameters[106].Value = iptoseq;
            parameters[107].Value = cveninvcode;
            parameters[108].Value = cveninvname;
            parameters[109].Value = cupsocode;
            parameters[110].Value = upsotype;
            parameters[111].Value = iordertype;
            parameters[112].Value = csoordercode;
            parameters[113].Value = iorderseq;
            parameters[114].Value = iorderdid;
            parameters[115].Value = cdemandmemo;
            parameters[116].Value = cbclosetime;
            parameters[117].Value = cbclosedate;
            parameters[118].Value = cbg_itemcode;
            parameters[119].Value = cbg_itemname;
            parameters[120].Value = cbg_caliberkey1;
            parameters[121].Value = cbg_caliberkeyname1;
            parameters[122].Value = cbg_caliberkey2;
            parameters[123].Value = cbg_caliberkeyname2;
            parameters[124].Value = cbg_caliberkey3;
            parameters[125].Value = cbg_caliberkeyname3;
            parameters[126].Value = cbg_calibercode1;
            parameters[127].Value = cbg_calibername1;
            parameters[128].Value = cbg_calibercode2;
            parameters[129].Value = cbg_calibername2;
            parameters[130].Value = cbg_calibercode3;
            parameters[131].Value = cbg_calibername3;
            parameters[132].Value = cbg_caliberkey4;
            parameters[133].Value = cbg_caliberkeyname4;
            parameters[134].Value = cbg_caliberkey5;
            parameters[135].Value = cbg_caliberkeyname5;
            parameters[136].Value = cbg_caliberkey6;
            parameters[137].Value = cbg_caliberkeyname6;
            parameters[138].Value = cbg_calibercode4;
            parameters[139].Value = cbg_calibername4;
            parameters[140].Value = cbg_calibercode5;
            parameters[141].Value = cbg_calibername5;
            parameters[142].Value = cbg_calibercode6;
            parameters[143].Value = cbg_calibername6;
            parameters[144].Value = ibg_ctrl;
            parameters[145].Value = cbg_auditopinion;
            parameters[146].Value = fexquantity;
            parameters[147].Value = fexnum;
            parameters[148].Value = ivouchrowno;
            parameters[149].Value = csrpolicy;
            parameters[150].Value = cxjspdids;
            parameters[151].Value = irequiretrackstyle;
            parameters[152].Value = ipresentb;
            parameters[153].Value = cinvccode;
            parameters[154].Value = binvtype;
            parameters[155].Value = bservice;
            parameters[156].Value = cbmemo;
            parameters[157].Value = cbsysbarcode;
            parameters[158].Value = cplanmethod;
            parameters[159].Value = planlotnumber;
            parameters[160].Value = bgift;
            parameters[161].Value = cfactorycode;
            parameters[162].Value = cfactoryname;
            parameters[163].Value = gcsourceid;
            parameters[164].Value = gcsourceids;
            parameters[165].Value = gcupcardnum;
            parameters[166].Value = gcupid;
            parameters[167].Value = gcupids;
            parameters[168].Value = yyc_invname;
            parameters[169].Value = iOrderAmt_f;
            parameters[170].Value = iOrderAmt;
            parameters[171].Value = iNROrderAmt_f;
            parameters[172].Value = iNROrderAmt;
            parameters[173].Value = csyssourceautoid;

            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["id"] != null && ds.Tables[0].Rows[0]["id"].ToString() != "")
                {
                    this.id = int.Parse(ds.Tables[0].Rows[0]["id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["poid"] != null && ds.Tables[0].Rows[0]["poid"].ToString() != "")
                {
                    this.poid = int.Parse(ds.Tables[0].Rows[0]["poid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iappids"] != null && ds.Tables[0].Rows[0]["iappids"].ToString() != "")
                {
                    this.iappids = int.Parse(ds.Tables[0].Rows[0]["iappids"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvcode"] != null)
                {
                    this.cinvcode = ds.Tables[0].Rows[0]["cinvcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvname"] != null)
                {
                    this.cinvname = ds.Tables[0].Rows[0]["cinvname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvstd"] != null)
                {
                    this.cinvstd = ds.Tables[0].Rows[0]["cinvstd"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvaddcode"] != null)
                {
                    this.cinvaddcode = ds.Tables[0].Rows[0]["cinvaddcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iquotedprice"] != null && ds.Tables[0].Rows[0]["iquotedprice"].ToString() != "")
                {
                    this.iquotedprice = decimal.Parse(ds.Tables[0].Rows[0]["iquotedprice"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iquantity"] != null && ds.Tables[0].Rows[0]["iquantity"].ToString() != "")
                {
                    this.iquantity = decimal.Parse(ds.Tables[0].Rows[0]["iquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["inum"] != null && ds.Tables[0].Rows[0]["inum"].ToString() != "")
                {
                    this.inum = decimal.Parse(ds.Tables[0].Rows[0]["inum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iunitprice"] != null && ds.Tables[0].Rows[0]["iunitprice"].ToString() != "")
                {
                    this.iunitprice = decimal.Parse(ds.Tables[0].Rows[0]["iunitprice"].ToString());
                }
                if (ds.Tables[0].Rows[0]["imoney"] != null && ds.Tables[0].Rows[0]["imoney"].ToString() != "")
                {
                    this.imoney = decimal.Parse(ds.Tables[0].Rows[0]["imoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["itax"] != null && ds.Tables[0].Rows[0]["itax"].ToString() != "")
                {
                    this.itax = decimal.Parse(ds.Tables[0].Rows[0]["itax"].ToString());
                }
                if (ds.Tables[0].Rows[0]["isum"] != null && ds.Tables[0].Rows[0]["isum"].ToString() != "")
                {
                    this.isum = decimal.Parse(ds.Tables[0].Rows[0]["isum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["idiscount"] != null && ds.Tables[0].Rows[0]["idiscount"].ToString() != "")
                {
                    this.idiscount = decimal.Parse(ds.Tables[0].Rows[0]["idiscount"].ToString());
                }
                if (ds.Tables[0].Rows[0]["inatunitprice"] != null && ds.Tables[0].Rows[0]["inatunitprice"].ToString() != "")
                {
                    this.inatunitprice = decimal.Parse(ds.Tables[0].Rows[0]["inatunitprice"].ToString());
                }
                if (ds.Tables[0].Rows[0]["inatmoney"] != null && ds.Tables[0].Rows[0]["inatmoney"].ToString() != "")
                {
                    this.inatmoney = decimal.Parse(ds.Tables[0].Rows[0]["inatmoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["inattax"] != null && ds.Tables[0].Rows[0]["inattax"].ToString() != "")
                {
                    this.inattax = decimal.Parse(ds.Tables[0].Rows[0]["inattax"].ToString());
                }
                if (ds.Tables[0].Rows[0]["inatsum"] != null && ds.Tables[0].Rows[0]["inatsum"].ToString() != "")
                {
                    this.inatsum = decimal.Parse(ds.Tables[0].Rows[0]["inatsum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["inatdiscount"] != null && ds.Tables[0].Rows[0]["inatdiscount"].ToString() != "")
                {
                    this.inatdiscount = decimal.Parse(ds.Tables[0].Rows[0]["inatdiscount"].ToString());
                }
                if (ds.Tables[0].Rows[0]["darrivedate"] != null && ds.Tables[0].Rows[0]["darrivedate"].ToString() != "")
                {
                    this.darrivedate = DateTime.Parse(ds.Tables[0].Rows[0]["darrivedate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cfree2"] != null)
                {
                    this.cfree2 = ds.Tables[0].Rows[0]["cfree2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree1"] != null)
                {
                    this.cfree1 = ds.Tables[0].Rows[0]["cfree1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cunitid"] != null)
                {
                    this.cunitid = ds.Tables[0].Rows[0]["cunitid"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvm_unit"] != null)
                {
                    this.cinvm_unit = ds.Tables[0].Rows[0]["cinvm_unit"].ToString();
                }
                if (ds.Tables[0].Rows[0]["igrouptype"] != null && ds.Tables[0].Rows[0]["igrouptype"].ToString() != "")
                {
                    this.igrouptype = int.Parse(ds.Tables[0].Rows[0]["igrouptype"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cgroupcode"] != null)
                {
                    this.cgroupcode = ds.Tables[0].Rows[0]["cgroupcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinva_unit"] != null)
                {
                    this.cinva_unit = ds.Tables[0].Rows[0]["cinva_unit"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iinvexchrate"] != null && ds.Tables[0].Rows[0]["iinvexchrate"].ToString() != "")
                {
                    this.iinvexchrate = decimal.Parse(ds.Tables[0].Rows[0]["iinvexchrate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvdefine1"] != null)
                {
                    this.cinvdefine1 = ds.Tables[0].Rows[0]["cinvdefine1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine2"] != null)
                {
                    this.cinvdefine2 = ds.Tables[0].Rows[0]["cinvdefine2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine3"] != null)
                {
                    this.cinvdefine3 = ds.Tables[0].Rows[0]["cinvdefine3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine4"] != null)
                {
                    this.cinvdefine4 = ds.Tables[0].Rows[0]["cinvdefine4"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine5"] != null)
                {
                    this.cinvdefine5 = ds.Tables[0].Rows[0]["cinvdefine5"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine6"] != null)
                {
                    this.cinvdefine6 = ds.Tables[0].Rows[0]["cinvdefine6"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine7"] != null)
                {
                    this.cinvdefine7 = ds.Tables[0].Rows[0]["cinvdefine7"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine8"] != null)
                {
                    this.cinvdefine8 = ds.Tables[0].Rows[0]["cinvdefine8"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine9"] != null)
                {
                    this.cinvdefine9 = ds.Tables[0].Rows[0]["cinvdefine9"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine10"] != null)
                {
                    this.cinvdefine10 = ds.Tables[0].Rows[0]["cinvdefine10"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ccomunitcode"] != null)
                {
                    this.ccomunitcode = ds.Tables[0].Rows[0]["ccomunitcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cinvdefine11"] != null && ds.Tables[0].Rows[0]["cinvdefine11"].ToString() != "")
                {
                    this.cinvdefine11 = int.Parse(ds.Tables[0].Rows[0]["cinvdefine11"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvdefine12"] != null && ds.Tables[0].Rows[0]["cinvdefine12"].ToString() != "")
                {
                    this.cinvdefine12 = int.Parse(ds.Tables[0].Rows[0]["cinvdefine12"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvdefine13"] != null && ds.Tables[0].Rows[0]["cinvdefine13"].ToString() != "")
                {
                    this.cinvdefine13 = decimal.Parse(ds.Tables[0].Rows[0]["cinvdefine13"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvdefine14"] != null && ds.Tables[0].Rows[0]["cinvdefine14"].ToString() != "")
                {
                    this.cinvdefine14 = decimal.Parse(ds.Tables[0].Rows[0]["cinvdefine14"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvdefine15"] != null && ds.Tables[0].Rows[0]["cinvdefine15"].ToString() != "")
                {
                    this.cinvdefine15 = DateTime.Parse(ds.Tables[0].Rows[0]["cinvdefine15"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvdefine16"] != null && ds.Tables[0].Rows[0]["cinvdefine16"].ToString() != "")
                {
                    this.cinvdefine16 = DateTime.Parse(ds.Tables[0].Rows[0]["cinvdefine16"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine22"] != null)
                {
                    this.cdefine22 = ds.Tables[0].Rows[0]["cdefine22"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine23"] != null)
                {
                    this.cdefine23 = ds.Tables[0].Rows[0]["cdefine23"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine24"] != null)
                {
                    this.cdefine24 = ds.Tables[0].Rows[0]["cdefine24"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine25"] != null)
                {
                    this.cdefine25 = ds.Tables[0].Rows[0]["cdefine25"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine26"] != null && ds.Tables[0].Rows[0]["cdefine26"].ToString() != "")
                {
                    this.cdefine26 = decimal.Parse(ds.Tables[0].Rows[0]["cdefine26"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine27"] != null && ds.Tables[0].Rows[0]["cdefine27"].ToString() != "")
                {
                    this.cdefine27 = decimal.Parse(ds.Tables[0].Rows[0]["cdefine27"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine28"] != null)
                {
                    this.cdefine28 = ds.Tables[0].Rows[0]["cdefine28"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine29"] != null)
                {
                    this.cdefine29 = ds.Tables[0].Rows[0]["cdefine29"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine30"] != null)
                {
                    this.cdefine30 = ds.Tables[0].Rows[0]["cdefine30"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine31"] != null)
                {
                    this.cdefine31 = ds.Tables[0].Rows[0]["cdefine31"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine32"] != null)
                {
                    this.cdefine32 = ds.Tables[0].Rows[0]["cdefine32"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine33"] != null)
                {
                    this.cdefine33 = ds.Tables[0].Rows[0]["cdefine33"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cdefine34"] != null && ds.Tables[0].Rows[0]["cdefine34"].ToString() != "")
                {
                    this.cdefine34 = int.Parse(ds.Tables[0].Rows[0]["cdefine34"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine35"] != null && ds.Tables[0].Rows[0]["cdefine35"].ToString() != "")
                {
                    this.cdefine35 = int.Parse(ds.Tables[0].Rows[0]["cdefine35"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine36"] != null && ds.Tables[0].Rows[0]["cdefine36"].ToString() != "")
                {
                    this.cdefine36 = DateTime.Parse(ds.Tables[0].Rows[0]["cdefine36"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdefine37"] != null && ds.Tables[0].Rows[0]["cdefine37"].ToString() != "")
                {
                    this.cdefine37 = DateTime.Parse(ds.Tables[0].Rows[0]["cdefine37"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ipertaxrate"] != null && ds.Tables[0].Rows[0]["ipertaxrate"].ToString() != "")
                {
                    this.ipertaxrate = decimal.Parse(ds.Tables[0].Rows[0]["ipertaxrate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["citemcode"] != null)
                {
                    this.citemcode = ds.Tables[0].Rows[0]["citemcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["citemname"] != null)
                {
                    this.citemname = ds.Tables[0].Rows[0]["citemname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["citem_class"] != null)
                {
                    this.citem_class = ds.Tables[0].Rows[0]["citem_class"].ToString();
                }
                if (ds.Tables[0].Rows[0]["citem_name"] != null)
                {
                    this.citem_name = ds.Tables[0].Rows[0]["citem_name"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ppcids"] != null && ds.Tables[0].Rows[0]["ppcids"].ToString() != "")
                {
                    this.ppcids = int.Parse(ds.Tables[0].Rows[0]["ppcids"].ToString());
                }
                if (ds.Tables[0].Rows[0]["contractrowguid"] != null && ds.Tables[0].Rows[0]["contractrowguid"].ToString() != "")
                {
                    this.contractrowguid = new Guid(ds.Tables[0].Rows[0]["contractrowguid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cfree3"] != null)
                {
                    this.cfree3 = ds.Tables[0].Rows[0]["cfree3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree4"] != null)
                {
                    this.cfree4 = ds.Tables[0].Rows[0]["cfree4"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree5"] != null)
                {
                    this.cfree5 = ds.Tables[0].Rows[0]["cfree5"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree6"] != null)
                {
                    this.cfree6 = ds.Tables[0].Rows[0]["cfree6"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree7"] != null)
                {
                    this.cfree7 = ds.Tables[0].Rows[0]["cfree7"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree8"] != null)
                {
                    this.cfree8 = ds.Tables[0].Rows[0]["cfree8"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree9"] != null)
                {
                    this.cfree9 = ds.Tables[0].Rows[0]["cfree9"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfree10"] != null)
                {
                    this.cfree10 = ds.Tables[0].Rows[0]["cfree10"].ToString();
                }
                if (ds.Tables[0].Rows[0]["itaxprice"] != null && ds.Tables[0].Rows[0]["itaxprice"].ToString() != "")
                {
                    this.itaxprice = decimal.Parse(ds.Tables[0].Rows[0]["itaxprice"].ToString());
                }
                if (ds.Tables[0].Rows[0]["isosid"] != null && ds.Tables[0].Rows[0]["isosid"].ToString() != "")
                {
                    this.isosid = int.Parse(ds.Tables[0].Rows[0]["isosid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvauthid"] != null && ds.Tables[0].Rows[0]["cinvauthid"].ToString() != "")
                {
                    this.cinvauthid = int.Parse(ds.Tables[0].Rows[0]["cinvauthid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["btaxcost"] != null && ds.Tables[0].Rows[0]["btaxcost"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["btaxcost"].ToString() == "1") || (ds.Tables[0].Rows[0]["btaxcost"].ToString().ToLower() == "true"))
                    {
                        this.btaxcost = true;
                    }
                    else
                    {
                        this.btaxcost = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["iarrqty"] != null && ds.Tables[0].Rows[0]["iarrqty"].ToString() != "")
                {
                    this.iarrqty = decimal.Parse(ds.Tables[0].Rows[0]["iarrqty"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iarrnum"] != null && ds.Tables[0].Rows[0]["iarrnum"].ToString() != "")
                {
                    this.iarrnum = decimal.Parse(ds.Tables[0].Rows[0]["iarrnum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iarrmoney"] != null && ds.Tables[0].Rows[0]["iarrmoney"].ToString() != "")
                {
                    this.iarrmoney = decimal.Parse(ds.Tables[0].Rows[0]["iarrmoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["inatarrmoney"] != null && ds.Tables[0].Rows[0]["inatarrmoney"].ToString() != "")
                {
                    this.inatarrmoney = decimal.Parse(ds.Tables[0].Rows[0]["inatarrmoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ireceivedqty"] != null && ds.Tables[0].Rows[0]["ireceivedqty"].ToString() != "")
                {
                    this.ireceivedqty = decimal.Parse(ds.Tables[0].Rows[0]["ireceivedqty"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ireceivednum"] != null && ds.Tables[0].Rows[0]["ireceivednum"].ToString() != "")
                {
                    this.ireceivednum = decimal.Parse(ds.Tables[0].Rows[0]["ireceivednum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ireceivedmoney"] != null && ds.Tables[0].Rows[0]["ireceivedmoney"].ToString() != "")
                {
                    this.ireceivedmoney = decimal.Parse(ds.Tables[0].Rows[0]["ireceivedmoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iinvqty"] != null && ds.Tables[0].Rows[0]["iinvqty"].ToString() != "")
                {
                    this.iinvqty = decimal.Parse(ds.Tables[0].Rows[0]["iinvqty"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iinvnum"] != null && ds.Tables[0].Rows[0]["iinvnum"].ToString() != "")
                {
                    this.iinvnum = decimal.Parse(ds.Tables[0].Rows[0]["iinvnum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iinvmoney"] != null && ds.Tables[0].Rows[0]["iinvmoney"].ToString() != "")
                {
                    this.iinvmoney = decimal.Parse(ds.Tables[0].Rows[0]["iinvmoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["inatinvmoney"] != null && ds.Tables[0].Rows[0]["inatinvmoney"].ToString() != "")
                {
                    this.inatinvmoney = decimal.Parse(ds.Tables[0].Rows[0]["inatinvmoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ioritotal"] != null && ds.Tables[0].Rows[0]["ioritotal"].ToString() != "")
                {
                    this.ioritotal = decimal.Parse(ds.Tables[0].Rows[0]["ioritotal"].ToString());
                }
                if (ds.Tables[0].Rows[0]["itotal"] != null && ds.Tables[0].Rows[0]["itotal"].ToString() != "")
                {
                    this.itotal = decimal.Parse(ds.Tables[0].Rows[0]["itotal"].ToString());
                }
                if (ds.Tables[0].Rows[0]["bgsp"] != null && ds.Tables[0].Rows[0]["bgsp"].ToString() != "")
                {
                    this.bgsp = int.Parse(ds.Tables[0].Rows[0]["bgsp"].ToString());
                }
                if (ds.Tables[0].Rows[0]["csource"] != null)
                {
                    this.csource = ds.Tables[0].Rows[0]["csource"].ToString();
                }
                if (ds.Tables[0].Rows[0]["csocode"] != null)
                {
                    this.csocode = ds.Tables[0].Rows[0]["csocode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["contractcode"] != null)
                {
                    this.contractcode = ds.Tables[0].Rows[0]["contractcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["contractrowno"] != null)
                {
                    this.contractrowno = ds.Tables[0].Rows[0]["contractrowno"].ToString();
                }
                if (ds.Tables[0].Rows[0]["irowno"] != null && ds.Tables[0].Rows[0]["irowno"].ToString() != "")
                {
                    this.irowno = int.Parse(ds.Tables[0].Rows[0]["irowno"].ToString());
                }
                if (ds.Tables[0].Rows[0]["sotype"] != null && ds.Tables[0].Rows[0]["sotype"].ToString() != "")
                {
                    this.sotype = int.Parse(ds.Tables[0].Rows[0]["sotype"].ToString());
                }
                if (ds.Tables[0].Rows[0]["sodid"] != null)
                {
                    this.sodid = ds.Tables[0].Rows[0]["sodid"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iinvmpcost"] != null && ds.Tables[0].Rows[0]["iinvmpcost"].ToString() != "")
                {
                    this.iinvmpcost = decimal.Parse(ds.Tables[0].Rows[0]["iinvmpcost"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cbcloser"] != null)
                {
                    this.cbcloser = ds.Tables[0].Rows[0]["cbcloser"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ippartid"] != null && ds.Tables[0].Rows[0]["ippartid"].ToString() != "")
                {
                    this.ippartid = int.Parse(ds.Tables[0].Rows[0]["ippartid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ipquantity"] != null && ds.Tables[0].Rows[0]["ipquantity"].ToString() != "")
                {
                    this.ipquantity = decimal.Parse(ds.Tables[0].Rows[0]["ipquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iptoseq"] != null && ds.Tables[0].Rows[0]["iptoseq"].ToString() != "")
                {
                    this.iptoseq = int.Parse(ds.Tables[0].Rows[0]["iptoseq"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cveninvcode"] != null)
                {
                    this.cveninvcode = ds.Tables[0].Rows[0]["cveninvcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cveninvname"] != null)
                {
                    this.cveninvname = ds.Tables[0].Rows[0]["cveninvname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cupsocode"] != null)
                {
                    this.cupsocode = ds.Tables[0].Rows[0]["cupsocode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["upsotype"] != null)
                {
                    this.upsotype = ds.Tables[0].Rows[0]["upsotype"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iordertype"] != null && ds.Tables[0].Rows[0]["iordertype"].ToString() != "")
                {
                    this.iordertype = int.Parse(ds.Tables[0].Rows[0]["iordertype"].ToString());
                }
                if (ds.Tables[0].Rows[0]["csoordercode"] != null)
                {
                    this.csoordercode = ds.Tables[0].Rows[0]["csoordercode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iorderseq"] != null && ds.Tables[0].Rows[0]["iorderseq"].ToString() != "")
                {
                    this.iorderseq = int.Parse(ds.Tables[0].Rows[0]["iorderseq"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iorderdid"] != null && ds.Tables[0].Rows[0]["iorderdid"].ToString() != "")
                {
                    this.iorderdid = int.Parse(ds.Tables[0].Rows[0]["iorderdid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cdemandmemo"] != null)
                {
                    this.cdemandmemo = ds.Tables[0].Rows[0]["cdemandmemo"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbclosetime"] != null && ds.Tables[0].Rows[0]["cbclosetime"].ToString() != "")
                {
                    this.cbclosetime = DateTime.Parse(ds.Tables[0].Rows[0]["cbclosetime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cbclosedate"] != null && ds.Tables[0].Rows[0]["cbclosedate"].ToString() != "")
                {
                    this.cbclosedate = DateTime.Parse(ds.Tables[0].Rows[0]["cbclosedate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cbg_itemcode"] != null)
                {
                    this.cbg_itemcode = ds.Tables[0].Rows[0]["cbg_itemcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_itemname"] != null)
                {
                    this.cbg_itemname = ds.Tables[0].Rows[0]["cbg_itemname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkey1"] != null)
                {
                    this.cbg_caliberkey1 = ds.Tables[0].Rows[0]["cbg_caliberkey1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkeyname1"] != null)
                {
                    this.cbg_caliberkeyname1 = ds.Tables[0].Rows[0]["cbg_caliberkeyname1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkey2"] != null)
                {
                    this.cbg_caliberkey2 = ds.Tables[0].Rows[0]["cbg_caliberkey2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkeyname2"] != null)
                {
                    this.cbg_caliberkeyname2 = ds.Tables[0].Rows[0]["cbg_caliberkeyname2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkey3"] != null)
                {
                    this.cbg_caliberkey3 = ds.Tables[0].Rows[0]["cbg_caliberkey3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkeyname3"] != null)
                {
                    this.cbg_caliberkeyname3 = ds.Tables[0].Rows[0]["cbg_caliberkeyname3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibercode1"] != null)
                {
                    this.cbg_calibercode1 = ds.Tables[0].Rows[0]["cbg_calibercode1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibername1"] != null)
                {
                    this.cbg_calibername1 = ds.Tables[0].Rows[0]["cbg_calibername1"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibercode2"] != null)
                {
                    this.cbg_calibercode2 = ds.Tables[0].Rows[0]["cbg_calibercode2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibername2"] != null)
                {
                    this.cbg_calibername2 = ds.Tables[0].Rows[0]["cbg_calibername2"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibercode3"] != null)
                {
                    this.cbg_calibercode3 = ds.Tables[0].Rows[0]["cbg_calibercode3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibername3"] != null)
                {
                    this.cbg_calibername3 = ds.Tables[0].Rows[0]["cbg_calibername3"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkey4"] != null)
                {
                    this.cbg_caliberkey4 = ds.Tables[0].Rows[0]["cbg_caliberkey4"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkeyname4"] != null)
                {
                    this.cbg_caliberkeyname4 = ds.Tables[0].Rows[0]["cbg_caliberkeyname4"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkey5"] != null)
                {
                    this.cbg_caliberkey5 = ds.Tables[0].Rows[0]["cbg_caliberkey5"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkeyname5"] != null)
                {
                    this.cbg_caliberkeyname5 = ds.Tables[0].Rows[0]["cbg_caliberkeyname5"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkey6"] != null)
                {
                    this.cbg_caliberkey6 = ds.Tables[0].Rows[0]["cbg_caliberkey6"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_caliberkeyname6"] != null)
                {
                    this.cbg_caliberkeyname6 = ds.Tables[0].Rows[0]["cbg_caliberkeyname6"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibercode4"] != null)
                {
                    this.cbg_calibercode4 = ds.Tables[0].Rows[0]["cbg_calibercode4"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibername4"] != null)
                {
                    this.cbg_calibername4 = ds.Tables[0].Rows[0]["cbg_calibername4"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibercode5"] != null)
                {
                    this.cbg_calibercode5 = ds.Tables[0].Rows[0]["cbg_calibercode5"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibername5"] != null)
                {
                    this.cbg_calibername5 = ds.Tables[0].Rows[0]["cbg_calibername5"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibercode6"] != null)
                {
                    this.cbg_calibercode6 = ds.Tables[0].Rows[0]["cbg_calibercode6"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbg_calibername6"] != null)
                {
                    this.cbg_calibername6 = ds.Tables[0].Rows[0]["cbg_calibername6"].ToString();
                }
                if (ds.Tables[0].Rows[0]["ibg_ctrl"] != null && ds.Tables[0].Rows[0]["ibg_ctrl"].ToString() != "")
                {
                    this.ibg_ctrl = int.Parse(ds.Tables[0].Rows[0]["ibg_ctrl"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cbg_auditopinion"] != null)
                {
                    this.cbg_auditopinion = ds.Tables[0].Rows[0]["cbg_auditopinion"].ToString();
                }
                if (ds.Tables[0].Rows[0]["fexquantity"] != null && ds.Tables[0].Rows[0]["fexquantity"].ToString() != "")
                {
                    this.fexquantity = decimal.Parse(ds.Tables[0].Rows[0]["fexquantity"].ToString());
                }
                if (ds.Tables[0].Rows[0]["fexnum"] != null && ds.Tables[0].Rows[0]["fexnum"].ToString() != "")
                {
                    this.fexnum = decimal.Parse(ds.Tables[0].Rows[0]["fexnum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ivouchrowno"] != null && ds.Tables[0].Rows[0]["ivouchrowno"].ToString() != "")
                {
                    this.ivouchrowno = int.Parse(ds.Tables[0].Rows[0]["ivouchrowno"].ToString());
                }
                if (ds.Tables[0].Rows[0]["csrpolicy"] != null)
                {
                    this.csrpolicy = ds.Tables[0].Rows[0]["csrpolicy"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cxjspdids"] != null)
                {
                    this.cxjspdids = ds.Tables[0].Rows[0]["cxjspdids"].ToString();
                }
                if (ds.Tables[0].Rows[0]["irequiretrackstyle"] != null && ds.Tables[0].Rows[0]["irequiretrackstyle"].ToString() != "")
                {
                    this.irequiretrackstyle = int.Parse(ds.Tables[0].Rows[0]["irequiretrackstyle"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ipresentb"] != null && ds.Tables[0].Rows[0]["ipresentb"].ToString() != "")
                {
                    this.ipresentb = int.Parse(ds.Tables[0].Rows[0]["ipresentb"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cinvccode"] != null)
                {
                    this.cinvccode = ds.Tables[0].Rows[0]["cinvccode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["binvtype"] != null && ds.Tables[0].Rows[0]["binvtype"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["binvtype"].ToString() == "1") || (ds.Tables[0].Rows[0]["binvtype"].ToString().ToLower() == "true"))
                    {
                        this.binvtype = true;
                    }
                    else
                    {
                        this.binvtype = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["bservice"] != null && ds.Tables[0].Rows[0]["bservice"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["bservice"].ToString() == "1") || (ds.Tables[0].Rows[0]["bservice"].ToString().ToLower() == "true"))
                    {
                        this.bservice = true;
                    }
                    else
                    {
                        this.bservice = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["cbmemo"] != null)
                {
                    this.cbmemo = ds.Tables[0].Rows[0]["cbmemo"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cbsysbarcode"] != null)
                {
                    this.cbsysbarcode = ds.Tables[0].Rows[0]["cbsysbarcode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cplanmethod"] != null)
                {
                    this.cplanmethod = ds.Tables[0].Rows[0]["cplanmethod"].ToString();
                }
                if (ds.Tables[0].Rows[0]["planlotnumber"] != null)
                {
                    this.planlotnumber = ds.Tables[0].Rows[0]["planlotnumber"].ToString();
                }
                if (ds.Tables[0].Rows[0]["bgift"] != null && ds.Tables[0].Rows[0]["bgift"].ToString() != "")
                {
                    this.bgift = int.Parse(ds.Tables[0].Rows[0]["bgift"].ToString());
                }
                if (ds.Tables[0].Rows[0]["cfactorycode"] != null)
                {
                    this.cfactorycode = ds.Tables[0].Rows[0]["cfactorycode"].ToString();
                }
                if (ds.Tables[0].Rows[0]["cfactoryname"] != null)
                {
                    this.cfactoryname = ds.Tables[0].Rows[0]["cfactoryname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["gcsourceid"] != null && ds.Tables[0].Rows[0]["gcsourceid"].ToString() != "")
                {
                    this.gcsourceid = int.Parse(ds.Tables[0].Rows[0]["gcsourceid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["gcsourceids"] != null && ds.Tables[0].Rows[0]["gcsourceids"].ToString() != "")
                {
                    this.gcsourceids = int.Parse(ds.Tables[0].Rows[0]["gcsourceids"].ToString());
                }
                if (ds.Tables[0].Rows[0]["gcupcardnum"] != null)
                {
                    this.gcupcardnum = ds.Tables[0].Rows[0]["gcupcardnum"].ToString();
                }
                if (ds.Tables[0].Rows[0]["gcupid"] != null && ds.Tables[0].Rows[0]["gcupid"].ToString() != "")
                {
                    this.gcupid = int.Parse(ds.Tables[0].Rows[0]["gcupid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["gcupids"] != null && ds.Tables[0].Rows[0]["gcupids"].ToString() != "")
                {
                    this.gcupids = int.Parse(ds.Tables[0].Rows[0]["gcupids"].ToString());
                }
                if (ds.Tables[0].Rows[0]["yyc_invname"] != null)
                {
                    this.yyc_invname = ds.Tables[0].Rows[0]["yyc_invname"].ToString();
                }
                if (ds.Tables[0].Rows[0]["iOrderAmt_f"] != null && ds.Tables[0].Rows[0]["iOrderAmt_f"].ToString() != "")
                {
                    this.iOrderAmt_f = decimal.Parse(ds.Tables[0].Rows[0]["iOrderAmt_f"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iOrderAmt"] != null && ds.Tables[0].Rows[0]["iOrderAmt"].ToString() != "")
                {
                    this.iOrderAmt = decimal.Parse(ds.Tables[0].Rows[0]["iOrderAmt"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iNROrderAmt_f"] != null && ds.Tables[0].Rows[0]["iNROrderAmt_f"].ToString() != "")
                {
                    this.iNROrderAmt_f = decimal.Parse(ds.Tables[0].Rows[0]["iNROrderAmt_f"].ToString());
                }
                if (ds.Tables[0].Rows[0]["iNROrderAmt"] != null && ds.Tables[0].Rows[0]["iNROrderAmt"].ToString() != "")
                {
                    this.iNROrderAmt = decimal.Parse(ds.Tables[0].Rows[0]["iNROrderAmt"].ToString());
                }
                if (ds.Tables[0].Rows[0]["csyssourceautoid"] != null)
                {
                    this.csyssourceautoid = ds.Tables[0].Rows[0]["csyssourceautoid"].ToString();
                }
            }
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select * ");
            strSql.Append(" FROM [zpurpotail] ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return DbHelperSQL.Query(strSql.ToString());
        }

        #endregion  Method
    }
}